Is it possible to restrict variant quantities to 1, but allow multiple purchases of a variant?
The reason for this is to allow for a customised product.
In the example of an engraved widget. Widget A in Blue would have an extended data field "message" of "Happy Birthday" but Widget A in Blue would have an extended data field of "Happy new Haircut".
You couldn't have multiple quantities because the extended data would either be ignored or overwritten and you would get two blue widgets with the same message - not what we want.
I had a similar issue on a previous project, it requires a bit of customisation (or our method did) but essentially if you add each variant with a unique code then they should be added as separate line items with their separate extended data.
Hope that helps, if not let me know and I'll try and dig out some code!
The approach we took was to create a custom basket controller based on the FastTrack version. We also created our own custom AddItem model although I dont think that will be strictly necessary for what you need as we had a few additional bits to do with custom pricing which is why we opted for that approach.
Have you got a copy of the Merchello source code? If not I'd definitely recommend pulling down a copy as we found there wasn't much in the documentation for this type of customisation.
I've not been able to load up the project we did this in for a code snippet but I will do when I get a chance if it would help.
Only allow for a single quantity
Is it possible to restrict variant quantities to 1, but allow multiple purchases of a variant?
The reason for this is to allow for a customised product.
In the example of an engraved widget. Widget A in Blue would have an extended data field "message" of "Happy Birthday" but Widget A in Blue would have an extended data field of "Happy new Haircut".
You couldn't have multiple quantities because the extended data would either be ignored or overwritten and you would get two blue widgets with the same message - not what we want.
Is this possible?
Hi Andrew,
I had a similar issue on a previous project, it requires a bit of customisation (or our method did) but essentially if you add each variant with a unique code then they should be added as separate line items with their separate extended data.
Hope that helps, if not let me know and I'll try and dig out some code!
Dave
I've run out of ideas on this, so if you've got any snippets which might put me on the right track it would be very much appreciated.
Hi Dave
Thanks for the quick reply. I figured it might be something like that.
I am setting the ExtendedData inthe AddingItem event, so I assume that changing/invalidating one of the Guid's would cause the required behaviour.
Am I on the right track? Any code would be useful.
Cheers, Andrew.
Hi Andrew,
The approach we took was to create a custom basket controller based on the FastTrack version. We also created our own custom AddItem model although I dont think that will be strictly necessary for what you need as we had a few additional bits to do with custom pricing which is why we opted for that approach.
Have you got a copy of the Merchello source code? If not I'd definitely recommend pulling down a copy as we found there wasn't much in the documentation for this type of customisation.
I've not been able to load up the project we did this in for a code snippet but I will do when I get a chance if it would help.
Dave
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.