E-Commerce with ProcessWire?
#101
Posted 02 May 2012 - 02:39 PM
#102
Posted 23 May 2012 - 07:40 AM
Antti, I've been sacrificing forum time for PW development time, and just wanted to apologize I've not been able to actively participate in this more. But I wanted to let you know how impressed and interested I am in this. I already have all kinds of plans for using this and getting more involved, and am thinking it will be perfect to use for the DI bookstore. This is the coolest and biggest PW project to come along, and I just wanted to explain my lack of posts in here. The reason is that I'm about to jump into a work schedule (this week) where I'm not going to be able to do anything major with PW for 6 weeks, other than fix bugs and make 2.2 official. Though I'll be developing [a site] in it, rather than developing for it, so I guess that still counts as ProcessWire time.
But I've been redirecting my forum time to put out a couple new PW features ahead of schedule (primarily repeatable fields), to hopefully buy some patience for the weeks ahead where I have to focus mostly on another project. But once that is done, I am looking forward to building a store and participating in the project.
Thanks for all the hard work, and the release of PW 2.2. Are you still planning on participating in this project? I hope this will help this project gain momentum, as I think a project like this will help PW get noticed.
#103
Posted 23 May 2012 - 10:23 AM
Thanks for all the hard work, and the release of PW 2.2. Are you still planning on participating in this project? I hope this will help this project gain momentum, as I think a project like this will help PW get noticed.
I'm always here to support any projects being developed in PW. But when it comes to development time, I mostly have to focus on the things that help to make ProcessWire and my business marketable to my clients. Right now, there isn't a demand for this with my own clients, but maybe there will be in the future. I hope there is because I agree about the value of this and am thrilled with the work that's been done thus far. This project is already under great direction and doesn't necessarily need me. One of the reasons for lack of demand with my own clients has to do with recent draconian PCI compliance rules. These rules push clients (and developers) to want to delegate the PCI compliance to dedicated service providers like Shopify, Volusion, etc. There is still a place for the self-hosted and open source carts though, it just means that the checkout strategy has to be different and a little less open/flexible from what it has traditionally been.
#104
Posted 23 May 2012 - 03:01 PM
Is it save to use the latest posted version?
#105
Posted 23 May 2012 - 03:04 PM
#106
Posted 24 May 2012 - 02:11 PM
And which kind of payments are supported?
#107
Posted 24 May 2012 - 02:16 PM
Invoice or Suomen Verkkomaksut, but I am planning to build the paypal this summer. Super busy at work currently, cannot promise anything extra for this spring...
#108
Posted 28 May 2012 - 06:17 AM
2012-05-28 07:09:52 admin http://.../processwire/module/ Parse Error syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM (line 16 of /.../site/modules/Shop/PaymentAbstract.php)
@somartist | modules created | support me, flattr my work flattr.com
#109
Posted 28 May 2012 - 08:22 AM
It does baffle me why they've never changed the error name.
#110
Posted 29 May 2012 - 04:29 PM
Another thought would be to extend the shoppingCart class in my own module, but without success sofar.
Could someone please help this novice in the right direction a bit??
Thanks.
#111
Posted 31 May 2012 - 10:51 AM
#112
Posted 31 May 2012 - 01:48 PM
So current method here is to render the cart by yourself all together (in your template for example). So instead of this:
<?= $modules->get("ShoppingCart")->renderCart() ?>
You would do something like this:
$cart = $modules->get("ShoppingCart");
$items = $cart->getCurrentCart();
foreach ($items as $item) {
// get product price from actual product page
$product = $pages->get($item->product_id);
$total_price = $item->qty * $product->sc_price;
$out .= "<td>{$product->title}</td>";
$out .= "<td><input data-price='" . $product->sc_price . "' name='items[{$product->id}]' type='number' size='2' value='" . (int) $item->qty . "'/></td>";
$out .= "<td>" . $cart->renderPrice($total_price) . "</td>";
$out .= "<td><a class='remove' href='./?sc_remove=" . $product->id . "'>remove</a></td>";
}
echo $out;
Well, look into renderCart() method in ShoppingCart module, it should give you best picture what to do there. But $items has all your items (page id and title), just iterate over them.
#113
Posted 31 May 2012 - 02:30 PM
#114
Posted 31 May 2012 - 02:40 PM
I am planning to make all render methods (the ones that output markup) hookable and also configurable. Although other way to look at it is that these modules should give you all the "low level" methods that make it simple to build your own cart.
So current method here is to render the cart by yourself all together (in your template for example). So instead of this:<?= $modules->get("ShoppingCart")->renderCart() ?>
You would do something like this:$cart = $modules->get("ShoppingCart"); $items = $cart->getCurrentCart(); foreach ($items as $item) { // get product price from actual product page $product = $pages->get($item->product_id); $total_price = $item->qty * $product->sc_price; $out .= "<td>{$product->title}</td>"; $out .= "<td><input data-price='" . $product->sc_price . "' name='items[{$product->id}]' type='number' size='2' value='" . (int) $item->qty . "'/></td>"; $out .= "<td>" . $cart->renderPrice($total_price) . "</td>"; $out .= "<td><a class='remove' href='./?sc_remove=" . $product->id . "'>remove</a></td>"; } echo $out;
Well, look into renderCart() method in ShoppingCart module, it should give you best picture what to do there. But $items has all your items (page id and title), just iterate over them.
Sweeeeeet!! I will play with this. Thanks for pointing me out in the right direction!!
#115
Posted 03 July 2012 - 02:17 PM
Still lots to do. Thinking of building an IcePay Payment module (http://www.icepay.com/api-2-en). This will add the, for the Dutch widely-used iDEAL paymentmethod tp Processwire
Using "Repeater" for product-variations is working great at the moment. Only one front-end question.
At the moment it lists all the product-variations for a given product. I would like to ajax-load the different variations based on a select-option, just like Drupal commerce does (http://demo.commerce...fee-holders/mug)
Any suggestions for a solution? Learning a lot at the moment, backend-end and front-end coding!
Thanks for any help!
#116
Posted 03 July 2012 - 02:50 PM
Hard to give much help with so little information. I myself don't like that "variations" are so much variations, that they require different images. I always tell my clients that good example for product variations is different sizes for t-shirt, but bad variation is different colors. Make each color a new product and then each size as a variable.
#118
Posted 03 July 2012 - 03:12 PM
I built a shop this summer using the above e-commerce modules, but significantly rewrote the checkout module to be a lot simpler. I used repeaters as variations and allowed a number of fields for each variation.
If you have a tshirt design, in three different colours and three different sizes, each of those colour and size combinations will need an inventory count. As such I added two drop downs for size and colour and a field for stock to the variation template.
The title and price of each variation were set using another module and a couple of property hooks. The title concatenated the titles of the product, size and colour. The price checked if the variation had a price set on it, and if not, grabbed the price from the product it was a variation of.
I found this the most sane way of dealing with the variations and it allowed the cart module to be none the wiser as it simply viewed each variation as a product and when it asked, was supplied with a title, price and stock count for that variation.
Stephen
#119
Posted 04 July 2012 - 02:20 AM
I don't think colour is any different a variation to size. The product details may well otherwise be the same, such as description, title, price so you'd have unnecessary duplication unless you created a layer above product such as product-group.
I think it depends a little. The shops what I have been building really were better when different colors were different products. When browsing for products it is much nicer to see different colors right away, on a category level. But of course if you have shop where "the thing" is the design print and you can choose whatever from 14 color for a shirt - then of course color should be a variation instead of own product.
I built a shop this summer using the above e-commerce modules, but significantly rewrote the checkout module to be a lot simpler.
Interested in hearing more about this. What stuff was unnecessary for you? Trying to find the sweet spot for the features baked in so that Shop module would be as easy and flexible as possible.
Also - excellent that shop module works out of the box with stock variations. I thought it should (since variation is just a page), but haven't got time to test this yet.
Is your shop online already Stephen?
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users













