lightspeedretail / webstore

Web Store eCommerce solution for Lightspeed
http://www.lightspeedpos.com/webstore
Open Software License 3.0
85 stars 63 forks source link

"Regular Price" slash on product detail page logic #651

Closed brandinchiu closed 9 years ago

brandinchiu commented 9 years ago

In the default views/product/index.php implementation logic for deciding whether or not to display "Regular Price: " followed by the slashed price doesn't work.

You have it set up to "display: none" the div in the event the $model->SlashedPrice variable is set. Since matrix products retrieve this info dynamically based on the changes to the size/color dropdowns, this doesn't work since the $model in this case is the parent (which won't have this data set).

This means children will always display the price, followed by the text "Regular Price: " and then nothing -- which is less than ideal.

brandinchiu commented 9 years ago

The easiest fix I could find was to change the wsmatrixselector widget's createSuccessAddToCart() method -- specifically the success js function returned:

if (data.FormattedRegularPrice != null) to if (data.FormattedRegularPrice != "")

Since the string is always empty, but not always NULL.

gabeguz commented 9 years ago

Hey @brandinchiu thanks for the report, I think this is the same issue as what's reported here: https://github.com/lightspeedretail/webstore/issues/626 That issue is fixed in what will become 3.2.6 -- currently undergoing QA testing. I'm going to close this as a duplicate, but please feel free to continue the discussion on issue #626