We don't see any code that would do it but before we dive in to the code, I reckon someone has had this problem and a solution is out there for this issue.
You can extend the razor store web services, to include the variant price.
Take a look in /Services/Commands/GetProductVariations.cs in the razor store project. The GetProductVariationsResponse method returns a Variations object, that you can extend to include the variation price. Note that you can't return any EntitiesV2 objects in the web service response, because of the way those objects are bound to the database.
Then you can extend the javascript api used on the product page, to update the product price.
Heres a link to the file i'm talking about: Bitbucket
If you cloned the razor store from bitbucket, the file structure should be the same. You have to build the package yourself in order to extend the webservices.
How to make Item page price reflect the price of a variant?
I had found this post http://our.umbraco.org/projects/website-utilities/ucommerce/ucommerce-support/39739-Dynamic-Price-update, but when I downloaded the code, but I didn't see the refered to GetProductVariationsResponse when downloading from https://bitbucket.org/uCommerce/ucommerce-razor-store.
The issue is that on my page http://www.theframeroom.com/ready-made-frames-from-the-frame-room/ready-made-picture-frames/sustainably-sourced-wood-frames/gold-compo-frame/c-24/c-89/p-10213 when I select the 8 x 10 option on the frame, it doesn't dynamically change the price on the page. When you add to the cart, it is correct, but I think for the customer not showing it is extremely confusing.
We don't see any code that would do it but before we dive in to the code, I reckon someone has had this problem and a solution is out there for this issue.
Thanks,
Kory
Hi Kory,
You can extend the razor store web services, to include the variant price.
Take a look in /Services/Commands/GetProductVariations.cs in the razor store project. The GetProductVariationsResponse method returns a Variations object, that you can extend to include the variation price. Note that you can't return any EntitiesV2 objects in the web service response, because of the way those objects are bound to the database.
Then you can extend the javascript api used on the product page, to update the product price.
Hope that helps,
Lars Horne-Mortensen
Hi Lars,
Thanks for the reply.
Where can I access the services file? I can't find the structure /Services/Commands/GetProductVariations.cs.
Thanks.
Kory
Hi Kory,
Heres a link to the file i'm talking about: Bitbucket
If you cloned the razor store from bitbucket, the file structure should be the same. You have to build the package yourself in order to extend the webservices.
/Lars
is working on a reply...