Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm trying to get prices for each variant (8GB, 16GB, 32GB etc.) on the same product.
I have set the price in the variant editor as a price attribute but I do not know how to get the value.
Thanks in advance!
UPDATE: It is actually supported. Se next answer.
That's a pretty important feature, and I can see that we actually does not allow you to fetch a price for a specific variant.
It works when you add the variant to the cart, but the GetPrice method of TC does not let you send a variantId along.
We need to fix that fast. I will take a look at it today and get back to you!
Thanks for looking into it!
Ah. I was too fast. It is actually supported, but the documentation was not showing how to do it. So don't mind my previous answer.
I have updated the documentation with an example of fetching prices for variants.
Hello again, not sure if I should start a new topic or continue this one, but here goes!
I'm going to have three different prices depending on the quantity.
Is this possible and if so, how? :)
Do I create three properties(price 1, price 2, price 3) in the Variant-document type?
In currency-setting there is a field for the property alias for the price. Is it possible to add more aliases or should I use, for example, variant.getPropertyValue("price2")?
In that case you should use the marketing system to calculate your prices. That way the discount will automatically be calculated when the order lines are updated in the cart.
If the setup is advanced you can make your own rules and/or awards. In your case a rule will probably be just fine. Check out the open source part of Tea Commerce on github to see how to do that:
The product in the frontend should then somehow explain how to get a cheaper price. How you show that is your "problem" depending on the case.
Thanks for the info, I just heard that it will be three different hardcoded prices. Is this possible or should I use the marketing system anyway? Different products will have different thresholds(1-25 qty, 1-40 qty, etc)
Then you might want to build an order line price calculator instead:
With that you get to choose the price that is set on the individual order line. You would then have to save the three prices as order line properties and then choose the correct price each time the order is recalculated.
Use the "Product property aliases" setting on the store to automatically save the product properties to the order line.
You really are a lifesaver!
Thanks for the information. Have a good day!
The product variants I have is a combination of colors and size for USB-sticks.
The problem is they have a lot of colors and sizes, it will be cumbersome to specify the price on all the combinations (example, blue - 16gb, red - 16gb, green - 16gb, green - 32gb, yellow 32gb etc.)
Can I specify the prices so the prices only shows up on the variant sizes of the products? Should I do it on the product itself and specify prices for the sizes (and the quantity price, as there will be different prices for quantity as well) or do you have a better idea how to solve it?
You are getting into some more advanced stuff now. I'm sure you can do it in one of two ways:
Maybe set the prices on the Size variant node and then make a Custom product information extractor to fetch the price. You should override the GetOriginalUnitPrices and the GetSnapshot methods:
The Tea Commerce For Umbraco 7 code is open source. So you could change the angular code and markup for the product variant property editor.
Lastly you could sign up for the Tea Commerce confidence program to get extra help with your project:
Okay, thanks a lot for the fast answer! :)
Have a good day!
No problem. Please flag the correct answer for others to see, when you have got it working.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted