Jump to content


Photo

E-Commerce with ProcessWire?


  • Please log in to reply
196 replies to this topic

#101 apeisa

apeisa

    Hero Member

  • Moderators
  • 2,517 posts
  • 842

  • LocationVihti, Finland

Posted 02 May 2012 - 02:39 PM

Raydale: I was thinking about at least post to showcase, since that was interesting project. It is actually using multisite module together with this site (www.marttaperinne.fi). But I have been very short of time, so this will take little longer.

#102 spoetnik

spoetnik

    Distinguished Member

  • Members
  • PipPip
  • 34 posts
  • 3

  • LocationEurope, the Netherlands

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.
If it ain't Dutch, it ain't much

#103 ryan

ryan

    Hero Member

  • Administrators
  • 5,753 posts
  • 3102

  • LocationAtlanta, GA

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 Nico Knoll

Nico Knoll

    The Boss.

  • Members
  • PipPipPipPipPip
  • 639 posts
  • 225

  • LocationBerlin, Germany

Posted 23 May 2012 - 03:01 PM

Well I got a job where I could need this module :)

Is it save to use the latest posted version?

#105 apeisa

apeisa

    Hero Member

  • Moderators
  • 2,517 posts
  • 842

  • LocationVihti, Finland

Posted 23 May 2012 - 03:04 PM

Nico - yes, it is working totally fine on www.martanpuoti.fi - and I will of course help and fix bugs if those occur.

#106 Nico Knoll

Nico Knoll

    The Boss.

  • Members
  • PipPipPipPipPip
  • 639 posts
  • 225

  • LocationBerlin, Germany

Posted 24 May 2012 - 02:11 PM

Could you post a link to the latest version again? :)

And which kind of payments are supported? :)

#107 apeisa

apeisa

    Hero Member

  • Moderators
  • 2,517 posts
  • 842

  • LocationVihti, Finland

Posted 24 May 2012 - 02:16 PM

https://github.com/a...for-ProcessWire

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 Soma

Soma

    Hero Member

  • Moderators
  • 3,183 posts
  • 1733

  • LocationSH, Switzerland

Posted 28 May 2012 - 06:17 AM

I still can't seem to install the module. When I got to module page and click for new modules, I get a server error.

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 Pete

Pete

    Administrator

  • Administrators
  • 1,753 posts
  • 652

  • LocationChester, England

Posted 28 May 2012 - 08:22 AM

Although I'm sure many PHP veterans already know, that's Hebrew for ::

It does baffle me why they've never changed the error name.

#110 spoetnik

spoetnik

    Distinguished Member

  • Members
  • PipPip
  • 34 posts
  • 3

  • LocationEurope, the Netherlands

Posted 29 May 2012 - 04:29 PM

Maybe this is more of a general PW question, or even a general php question. How do I controll and modify the default output of modules?? I am trying to modify the default shoppingcart. I heart about hooks, but don't know if they are there, and if they are there, how to use them.
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.
If it ain't Dutch, it ain't much

#111 ryan

ryan

    Hero Member

  • Administrators
  • 5,753 posts
  • 3102

  • LocationAtlanta, GA

Posted 31 May 2012 - 10:51 AM

You can hook in before or after any method that starts with 3 underscores, like: ___methodName(). For more about this take a look at the Helloworld.module file included in the PW installation (/site/modules/Helloworld.module). Antti can probably advise better than me as to if or what methods in the shopping cart are intended to be hooked. But to answer your question I think we'd need to know more about specifically what you are trying to do in terms of output?

#112 apeisa

apeisa

    Hero Member

  • Moderators
  • 2,517 posts
  • 842

  • LocationVihti, Finland

Posted 31 May 2012 - 01:48 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.

#113 JeffS

JeffS

    Distinguished Member

  • Members
  • PipPipPip
  • 76 posts
  • 61

  • LocationMichigan - USA

Posted 31 May 2012 - 02:30 PM

If you need a quick affordable and PCI compliant solution to plug a cart into Processwire you might want to take a look at Foxycart.com. It is a javascript based cart (obviously requires javascript client side)that you can plug into anything trivially. It's well thought out. Lots of options. Nothing to maintain. What's nice is being fr-e to turn any page anywhere in your site into a product. Used it with Modx sites without a hitch.

#114 spoetnik

spoetnik

    Distinguished Member

  • Members
  • PipPip
  • 34 posts
  • 3

  • LocationEurope, the Netherlands

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!!
If it ain't Dutch, it ain't much

#115 spoetnik

spoetnik

    Distinguished Member

  • Members
  • PipPip
  • 34 posts
  • 3

  • LocationEurope, the Netherlands

Posted 03 July 2012 - 02:17 PM

I have been cracking on with E-commerce for Processwire, and I love it so far!

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!
Posted Image
If it ain't Dutch, it ain't much

#116 apeisa

apeisa

    Hero Member

  • Moderators
  • 2,517 posts
  • 842

  • LocationVihti, Finland

Posted 03 July 2012 - 02:50 PM

Spoetnik, great to hear. I will be adding support for product variations in to the module somewhere between August and December, since I need to implement them for a client. Great to hear that the concept of using repeater for variations works, since that is what I am planning to use in shop core as well!

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.

#117 spoetnik

spoetnik

    Distinguished Member

  • Members
  • PipPip
  • 34 posts
  • 3

  • LocationEurope, the Netherlands

Posted 03 July 2012 - 02:55 PM

In this specific example, they sell kiteboards. One board with different sizes (variations), but each size has it's own print...
If it ain't Dutch, it ain't much

#118 ffub

ffub

    Jr. Member

  • Members
  • PipPip
  • 32 posts
  • 12

  • LocationLondon, UK

Posted 03 July 2012 - 03:12 PM

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 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 apeisa

apeisa

    Hero Member

  • Moderators
  • 2,517 posts
  • 842

  • LocationVihti, Finland

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?

#120 newbie140

newbie140

    Newbie

  • Members
  • Pip
  • 7 posts
  • 0

Posted 09 July 2012 - 09:49 PM

Can anyone help me please....How can i build an e-commerce website using processwire?
I need some guidelines...Thanks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users