Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

E-Commerce Modules /

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, Ed, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba

Issue with Product Variation Quantities


Go to End


2 Posts   1826 Views

Avatar
pjonathan

Community Member, 9 Posts

4 February 2010 at 2:51pm

Hi all, I've implemented the e-commerce module, and am using product variations exclusively. Adding to cart works, but the +/- quantity functions are not working. The issue is: the ID in the add/remove link is the ID of the product, not the variation. I get the following error message as a result:

Fatal error: Call to a member function getQuantity() on a non-object in...

How would I go about pointing to the variation id, and not the product id?

Thanks in advance!

Avatar
kb

Community Member, 4 Posts

16 February 2010 at 10:01pm

Have a look at http://silverstripe.org/e-commerce-module-forum/show/266407, seems like he had the same problem and solved it (code included).