Jump to content

E-Commerce with ProcessWire?


Crash-n-Burn

Recommended Posts

I've been seriously researching the options for digital products (e-goods) since we have several record label clients running stores that sell music downloads, and we're attempting to migrate away from Joomla, where we have been using a component for this.

So far my experience with Ecwid has been great - the pricing is very reasonable, they have a free plan, and everything seems to work well;

For e-goods, you get 100 products, unlimited storage and bandwidth for $15/month. The only issue is the 100MB max on the filesize, but there are ways around that, such as splitting large files into multi-part archives, however this can be less than convenient for the end user than just getting the complete file.

Ecwid integration with processwire is nothing; the only thing that could get tricky involves the SEO with ajax, and they have instructions for how to get this setup right; Most people would have a separate page for each product in PW anyway, so that wouldn't be an issue.

the other e-goods options I have looked at include:

http://www.fetchapp.com

https://gumroad.com/
http://quixly.com/
http://pulleyapp.com/

Fetchapp's pricing (http://www.fetchapp.com/pages/plans) can't really compete with Ecwid, unless you use the $10 "use your own server" plan, and then host the files on s3. I think one advantage of fetchapp is that it can host larger files without breaking them up; The only other thing is that Fetchapp is digital goods only, while Ecwid can do both digital and physical..

Gumroad looks cool- there is no monthly fee, and you don't need to have a payment gateway, like PayPal...

this article was kind of helpful...

http://www.smashingmagazine.com/2012/03/29/selling-digital-goods-online-e-commerce-services-compared/

-marc

  • Like 2
Link to comment
Share on other sites

I'm setting up Apeisas shopping cart on a site as we speak. In creating a template to display the shopping cart with $modules->get('ShoppingCart')->renderCart(); I'm finding that when the show cart page is created at this level:

Home

      -show cart

      -products

             -product1

             -product2

I only get 'No items in cart displayed on the page'. In order to get the cart contents to display I have to have the page 'show cart' as a child of the products, which I don't want.

Any ideas?

Link to comment
Share on other sites

I have a site with a working cart on my local WAMP stack. This is the entire 'cart' template -

<?php

/**
 * Page template
 *
 */

include("./head.inc");
include("./navbar.inc");
?>

  <div class="container">
    <h1>Your Cart</h1>
    <?php echo $modules->get("ShoppingCart")->renderCart(); ?>
  </div>

<?php
include("./foot.inc");
Link to comment
Share on other sites

This is mine:


<?php include_once('includes/the_head.inc.php'); ?>
 
<div class="container">
  <?php include_once('includes/the_header.inc.php'); ?>
  <?php include_once('includes/the_sidebar.inc.php'); ?>
  <div class="content">
  
   <?php echo $modules->get("ShoppingCart")->renderCart(); ?>
   
<!-- end .content --></div>
 <!-- end .container --></div>
  <?php include_once('includes/the_footer.inc.php'); ?>
 but as I said it only renders the cart when the page is a child of the products. In any position above that it returns "No items in cart". So it is getting to the ShoppinCart module because this is the line that returns that message:


if (count($items) == 0) {
return $this->_("No items in cart");
}
And there are items in the cart as well. This is what I do not understand.
Link to comment
Share on other sites

"No items in cart". This is the output I get when the cart page is in this hierachy:

Home

        -products

                   -product1

        -cart

When the page is here I get the cart contents rendered:

Home

        -products

                   -product1

                              -cart

Link to comment
Share on other sites

Hey guys,

I'm currently running my first tests with PW...and I just might jump on the PW train, it feels a lot more flexible and clean than other CMS. I'm not a coder or webdesigner, all I do is helping friends and family with their needs :)

But I do have one question regarding the shopping-module: is there any way to show taxes on the cart or even the product page? If I'm using it for my current project, I'll need that...

Link to comment
Share on other sites

hm, alright. just some brainstorming:

For any kind of taxes another field next to the price with n% of the price should do - or am I mistaken here?

The necessary things would be:

tax identifier (e.g. VAT)

tax rate (e.g. 19%, current VAT rate in germany)

One should be able to enable or disable the "tax field" within the product-page-template. When enabled, you need to be able to select the tax you want to show on the product.

...but: I need to set up the product + categories first, right now the general layout is fine, but productcategories + products don't really look like they are supposed to. :)

Link to comment
Share on other sites

Currently there ain't any kind of taxes on these modules. Looking forward to implement them at some point. Just no clue how they should work that it would be flexible around the globe.

Hi, lookig forward to tax support.

For begining will be good to may option to create taxes like:

Name - Value - default

Basic tax - 21% - yes

Lower tax - 15% - no

...

And have option to select/show this custom created taxes to products. (Option price with and/or without vat).

Offcourse cart need to show and count that.

Dont know if this is enough, but discussion may start.

Link to comment
Share on other sites

Listing the taxes and including them is not the complication - it is just values from pages. But knowing WHEN is a little more complicated.

For instance if you are exporting out of the EU you would not charge VAT but you would if you are selling within your own country. I am not completely sure how that all works, but there will need to be some checks once the user has entered the shipping/billing information. 

I suppose that means you also need to tell the software where the shop is! :)

Link to comment
Share on other sites

I think my questions are:

a) are there any other kind of taxes than percentage taxes?

b) is the tax always calculated in same manner? From the price or added to the price?

c) any other regional issues like the one Joss mentioned?

Link to comment
Share on other sites

I have never seen any flat rate taxes (the only other kind) applied to goods, at least not those sold online.

We used to have a window tax, but that was abolished a couple of centuries ago.

There can be two ways of including the tax, either as an addition or as part of the price.

Really this is down to best practice and local laws. In the UK, when selling retail, the price you quote MUST include VAT.

When selling wholesale to companies, it is normal to quote the price without the VAT since the buying company can probably claim it back.

The way round it is to have a Price box, a dropdown for the tax (with a default or you will annoy people who have hundreds of products to add), and then a check box for "price excludes tax." Again, the other way around in annoying since most ecommerce is retail and therefore includes tax.

As for the regional variations, I am not sure how that works.

I suspect it is sometimes taken care of by the payment gateway, because I often find that that is the point when it changes. But I am really not sure at all.

By the way, this is interesting, because the client for whom I have just re-templated his site wants to jump to a new solution in 18 months or so. His is a very basic shop (as in, it is all hard goods and nothing complicated), but he has 13,000 products spread across about 10,000 categories. 

So we might have a big challenge in the future!

Joss

Link to comment
Share on other sites

I used to use a shopping cart software and I thought if I give you some of the set up options from that, it might help you configure a module for PW.

First see attached document that shows the basic tax set up for that software.

Some of the main set up selections are listed below:

TAX MODE

Simple or Advanced (select one)

SIMPLE TAX

Enter a description e.g VAT

Enter a message e.g VAT payable on all UK orders

Enter a % Rate e.g 20.00

ADVANCED

Product Prices Entered

Price inclusive of tax or Price exclusive of tax (Select one)

Taxes

Enter name e.g VAT

Tax Rounding Level - Line Item Order (select one)

Tax Rounding Method - Truncate, Round Half Down, Standard, Round Up, Banker's Rounding (select one)

Tax By Location

Always apply taxes, Tax by delivery address, Tax by Invoice address (select one)

Tax Zones

Add a Zone (you can add multiple zones) - Enter name e.g UK, select countries to be included in that zone e.g England, Scotland, Wales, Northern Ireland and save it.

Then in Shipping and Handling section you would select shipping charges made - yes or no. If yes, choose the Tax Rate e.g VAT (as defined in Taxes above, Zero Rated, Exempt, Custom. If custom is selected enter custom rate.

Select if handling charges are made. If yes, select Tax Rate (same as for Shipping selection).

Then we get into Shipping configuration e.g Simple or By Zone and Class. That's a bit more complicated e.g Simple is a fixed charge e.g. 5.00EUR, By Zone and Class uses various methods like by weight classes and you can set up different postal charges e.g

UK - First Class

UK - Second Class

UK - Standard Parcel etc.

There's more info here

I hope that helps. Let me know if you need any clarification.

tax_set_up.doc

  • Like 4
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

Great modules apeisa! I've been playing with the shop the last couple of hours. I've noticed a small error. When going back in the browser (or requesting the url /checkout/confirmation/ in general) the following error is displayed:

Error: Call to a member function getModuleInfo() on a non-object (line 221 of /processwire/site/modules/Shop-for-ProcessWire/ShoppingCheckout.module)

The error seems to be linked to $paymentmethodInfo = $paymentmethod->getModuleInfo(). I think it would be nice if an error like "You've requested the confirmation page of the checkout process. There is nothing to confirm.". Any pointers on how to do this myself are also appreciated.

Link to comment
Share on other sites

Arjen, I have seen that error few times (from live site), but never figured how to reproduce it. Big thanks for finding it,

I think there should be some check that payment was found. So some check on between lines 220 and 221.

Link to comment
Share on other sites

  • 1 month later...

Apeisa (and others),

How would you approach creating an extra field for a single checkbox to be saved with an order? I.e. a label like "I want to signup for this newsletter". 

For now I've created an extra field (checkbox) attached it to the template, added the checkbox option to the array of fields. It all works fine except that in the final save the newsletter checkbox get set to 1.

I suspect it to be somewhere around this line. We've added that particular check to see it a field isset and therefore the value can be set to 1. When on the confirmation page this echo's all fine, but when creating/saving the order the newsletter checkbox get sets to 1. When printing the array it does show up as 1. That is because in the $orderFields array for some reason the newsletter box gets filled. Any ideas?

I've tested this on several browsers, cleaned cookie so I suspect that not to be the issue.

Link to comment
Share on other sites

Found some interesting things:

Within the createOrder() function the 

$this->input->post->newsletter 

 produces different output than the 

$fields['newsletter']['value'] 

So saving the field on this line with the post value

$order->sc_newsletter = wire()->sanitizer->text($this->input->post->newsletter) 

 does work.

Now I have to find out why the data isn't stored correctly in the array.

Link to comment
Share on other sites

  • 1 month later...

I just implemented possibility to add multiple shoping options.Yesterday I build small markup module which venders the shopping steps (1. cart, 2. information, 3. confirmation, 4. payment, 5. order
complete). 

Also some minor tweaks here and there. I will also add option to choose currency (I am not planning to support multiple currencies,
but possibility to choose what currency the shop uses will be there). Hopefully I get today all wrapped up and can commit it.

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...