Displaying product price including all applicable discounts
I am new to UCommerce and I am currently working with UCommerce version V2.6.1.0. I have also downloaded the latest Razor store as a reference point.
I have a requirement to display the FULL product price as a 'WAS' price and then the price when a current discount has been added to the price, as a 'NOW' price.
e.g. Was £30.00 Now £20.00
In the reference site there is a perfect example of how this can be done using:
var price = CatalogLibrary.CalculatePrice(product);
This gives all prices / discount / tax etc which is great.
However, this is not available in my version of uCommerce, I'm just wondering is there an equivalent I can use? I've had a look around but can't find anything at present.
The CatalogLibrary helper was added in version 3, and prior to that there wasn't any help calculating the discount price. Are there a reason not to upgrade to the newest version?
Unfortunately the site cannot be upgraded at present for a number of reasons.
Any best practice advice on implementing this in version 2.6.1.0 would be greatly appreciated. It doesn't have to be anything complex as long as I can achieve similar functionality?
I think there was a change in the way that connectionstrings was registered. When dealing with a major upgrade (from 2 to 3), i recommend that you do a clean installation, and start porting all of your work over in the new project. It's a bit of a monkey task, however in the long run it is by far the safest solution. There could be alot of compiling errors also.
Thanks Morten, I tried for the best part of a day to get an upgrade to work with no joy at all. I sorted the connection string issue but it was error after error following this. I could have taken your approach as you mentioned however I decided to roll back to the original version and I have worked out how to apply discounts / awards to individual products and display the awards front end before adding to the basket.
It was hard work finding out the approach to be honest, I really like UCommerce from what I have seen but I think for the benefit of users of older versions, prior to version 3, it would really benefit from a full documentation with worked examples, especially for the adding of discounts / awards etc. If anyone needs an example of how I have done this let me know on here and Ill post it.
Displaying product price including all applicable discounts
I am new to UCommerce and I am currently working with UCommerce version V2.6.1.0. I have also downloaded the latest Razor store as a reference point.
I have a requirement to display the FULL product price as a 'WAS' price and then the price when a current discount has been added to the price, as a 'NOW' price.
e.g. Was £30.00 Now £20.00
In the reference site there is a perfect example of how this can be done using:
var price = CatalogLibrary.CalculatePrice(product);
This gives all prices / discount / tax etc which is great.
However, this is not available in my version of uCommerce, I'm just wondering is there an equivalent I can use? I've had a look around but can't find anything at present.
Thanks
Kev
The CatalogLibrary helper was added in version 3, and prior to that there wasn't any help calculating the discount price. Are there a reason not to upgrade to the newest version?
Hi Nickolaj
Unfortunately the site cannot be upgraded at present for a number of reasons.
Any best practice advice on implementing this in version 2.6.1.0 would be greatly appreciated. It doesn't have to be anything complex as long as I can achieve similar functionality?
Thanks for your help.
Further to this, we have decided that we will go down the upgrade route after all. We have attempted an upgrade from 2.6.1.0 to 3.6.5.13233.
After the package install has run I am getting 'Unrecognized attribute 'connectionString'. Note that attribute names are case-sensitive.'
This is referring to the 'connectionString' attribute of the 'runtimeConfiguration' in the commerce section of the web.config.
Any ideas on why this could be happening?
Thanks
Hi Kevin,
I think there was a change in the way that connectionstrings was registered. When dealing with a major upgrade (from 2 to 3), i recommend that you do a clean installation, and start porting all of your work over in the new project. It's a bit of a monkey task, however in the long run it is by far the safest solution. There could be alot of compiling errors also.
Thanks Morten, I tried for the best part of a day to get an upgrade to work with no joy at all. I sorted the connection string issue but it was error after error following this. I could have taken your approach as you mentioned however I decided to roll back to the original version and I have worked out how to apply discounts / awards to individual products and display the awards front end before adding to the basket.
It was hard work finding out the approach to be honest, I really like UCommerce from what I have seen but I think for the benefit of users of older versions, prior to version 3, it would really benefit from a full documentation with worked examples, especially for the adding of discounts / awards etc. If anyone needs an example of how I have done this let me know on here and Ill post it.
is working on a reply...