I've been unable to find a way to achieve this. Hoping someone may have some experience, know a plugin, or have a clever idea...
With product attributes/variations we can add the ability for a product to be altered and that alteration comes with a price increase.
So we have:
So above, if you ordered a quantity of 3, the first item would come to $300, and the second would come to $330.
But, what if "gift wrapping" only cost $10 no matter what the quantity was... And we actually need the second option above to total $310.
TotalItemPrice = (3 x 100) + 10
Is there a way to achieve this?
Also, for the record, I'm on Sitefinity 5.2.
We've heard from Telerik on this, and it sounds like the next release of Sitefinity may allow us to control pricing a bit more. However, timing on that is not going to be good for us.
We've not yet had any cleaver ideas on how to solve this in Sitefinity 5.2... If anyone has an idea, we'd really appreciate your thoughts.
Thanks for your comments! It has taken me a while to get my head wrapped around this one... So you're recommending we create a generic "Gift Wrapping" product that costs $10, and then by adding a checkbox to the product itself we will be able to do two things:
So, in the case that a user buys Products A, B (wrapped), C, and D (wrapped), the final order would look like this:
So that totals $720. Two products were wrapped, thus $20, and the quantity of those two ignored (as I requested in my use-case scenario).
I think that could work. A tad odd for the user-experience, but I think it's ultimately understandable. The people invoicing the order will get the right amount, and thanks to the product checkbox, the people fullfilling the orders should recognize which items were requested for gift wrapping.
So the big question... How would we hook up an add-to-cart trigger that simultaneously adds a second product to the cart?
Hello Brandon, You can inherit from the AddToCart widget and override InitializeControls to subscribe to your own event for the button click. There you can check the product for gift wrapping and add the GiftWrap product to the cart or increment it's quantity if it's already there. Regards, Randy Hodge the Telerik team
I appreciate your help so far.
We're unable to implement your suggestion because we don't know how to hook into the correct processes, and we can't find any sample code of how to do it.
The "Add to Cart" widget seems to be unaware of the rest of the custom fields on the page at the time it is used -- it uses an AJAX call to add to cart. But we are unaware of a better hook in the processes of adding to the cart where we could check the products custom value settings.
We also couldn't find sample code for how to programmatically add a product to the shopping cart (or increment it's quantity).
Sample code seems sparse online, and the documentation doesn't get this detailed.
Any help is appreciated!
I think we have it functional, in most respects now. I'll post more details after we know for sure, and finish testing.
However, we've found that this solution poses a "can of worms" of other things to consider... Such as, what if the user removes the original item that was set to be gift-wrapped once they make it to the checkout page? And it allows the new hidden "Gift Wrapping" product to be treated as any other, where it can be removed at checkout, but it is disconnected from the original item which is still "flagged" for gift-wrapping. A potential whole for getting the wrapping without paying for it...
Just some thoughts, if anyone else is trying to do this.
Randy, You mention creating a Hidden product. Can you explain how to do that. We've created the product but It's showing up in our site as a valid product. If I make it inactive then the shopping cart does a lot of unwanted stuff including not adding the product price to the total.
How can we make the product not visible to shoppers.
ProductsMasterViewCustom : ProductsMasterView
IList<Product> prodList =
x = prodList.Count - 1; x >= 0; x--)