Developer forum

Forum » Ecommerce - Standard features » Product Price Field Discount is gone

Product Price Field Discount is gone

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

We just upgraded a solution from 8.8 to 9.4.

Pretty painful upgrade, as probably most of you have experienced.
After the upgrade, we have noticed that one of the discounts that were regularly used by our customer, is gone.

Dynamicweb.Ecommerce.SalesDiscounts.ProductPriceFieldDiscount is gone.

This discount was the only way we could find to handle displaying "Old Price" "New Price".

For those who don't remember the functionality, this discpunt gave the ability t set the price based on a value of a Custom Field on the Product.

Was pretty useful for the above use case and I would reeally love to have it back.

Now that it's gone, I need to know how to replicate this behavior using the other sales discounts in the platform.

Thank you,

Adrian

 


Replies

 
Nicolai Pedersen
Reply

Hi Adrian

No, I have not experienced that - most upgrades I made took less than a day...

You should be able to find the ProductPriceFieldDiscount in the Dynamicweb.Ecommerce.SalesDiscounts.ProductPriceFieldDiscount.dll

All discounts supports normal price and discounted price rendering tags. We do that i.e. on Rapido. That discount is used when the discount is not calculated by Dynamicweb but comes integrated or you want to control precisly what the price should be - and not use the price magtrix (which does not show the price as a discount, but just a price).

BR Nicolai

 

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

This one was a very long one because of the difference between the versions. 8.8 to 9.4.

That's exactly what we used to use this discount for.

After the upgrade, the system name of the discount in database was Dynamicweb.Ecommerce.SalesDiscounts.ProductPriceFieldDiscount.ProductPriceFieldDiscount

For some reason it was not found as an option in the discount dialog. I have managed to rerun updates now (thank to a response from Morten B.) and now it shows up (pretty weird).

What I have noticed is the value of the discount does not seem to be rendered inline (on the product orderline) but rather as a separate Orderline.

I will double check any possible influence from our template.

Thank you,

Adrian

 

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

I have managed to set up the discount, which is fine but now I have another issue.

I was trying to get the value for the discount price, the same way I did before.

By using the GetDouble("Ecom:Product.Discount.Price.PriceWithVAT") tag.

I have checked now, and this tag returns 0.00 even if there is a value for Ecom:Product.Discount.TotalAmount

See screenshot for templatetags.

Aren't they supposed to be connected with each other?

Thanks,
Adrian

productDiscount.png
 
Nicolai Pedersen
Reply

That tag only holds a value if the product have the discount as far as I remember. How does the tag list look like with 2 different products - one with and one without the discount?

NP

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

In 8.8.x, it used to display the value of the discounted price. I know it becuase I am trying to use the same template and the logic was built based on that.

This product is assigned to a Product Field Discount.

I have checked a product that is not assigned to any product discount and it seems weird. Everything that was zero for the one with discount, now has value. Except for the Total Amount that is zero. And the values are based on the product price.

I would expect that A product with discount would have values for all discount related fields while a product without discount would have zero for all.

Would you agree?

It seems the other way around. See attach.

Thanks,

Adrian

 

product_discount_price_no_discount.png
 
Nicolai Pedersen
Reply

Im not sure I fully understand the setup.

We need a url and some info on what discount has been setup how. It might be better if you create a case.

Thanks, Nicolai

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

The setup is very simple.

You set up a Product field based discount (not and Order discount). Assign one of the products to it. Check what the Discount tags are returning.

Normally (assuming what was happening in 8.8.x was normal), the product being assigned to the discount should have in the Discount related tags, values based on the value stored in the Field used to setup the discount.With VAT, Without VAT etc. And the product that is not assigned to discount, should have 0 in all.

If you want to have a look, here are 2 links (they already have Template tags rendered):

Product with discount:

http://australdev9.dotfusion.ro/catalog/masini-de-birou/masini-si-utilaje-de-birou/aparat-de-ascutit-heinner-dbs03-110-w

Product Without discount

http://australdev9.dotfusion.ro/catalog/cadouri-business/tiparituri/fisa-de-magazie-a5-fata-verso

Thank you,
Adrian

 

You must be logged in to post in the forum