
Originally Posted by
Lordzoabar
Updated and everything is (mostly) working perfectly. Dynamic Price Updater is doing everything it is supposed to be doing, except for any items I have that are marked as on sale. It still dynamically updates the price, both before and after the sale is effected, but it is causing a weird graphical glitch. I've included pictures of one of the product pages, both with and without DPU enabled.
Enable=FALSE
Enable=TRUE
I have Error Logging activated, but it isn't turning anything up, so I have no idea where to actually look.
https://www.athensartandframe.com/ is our live site, if you want to see what I'm talking about in action. It's pretty much every item that is marked as being on sale, which will be our Diploma and Business frames, and the framed artwork.
So, a portion of the issue was identified after posting the change to the ZC forum for review, another part though is new "territory" as I haven't seen the space that follows the Sale: turned into the html entity before.
The part that was identified was the reuse of the definition: PRODUCT_PRICE_SALE for the preDiscPrefix when displaying the product's "original" price as compared to its sale price.
If you take a look in: includes/classes/dynamic_price_updater.php
Within the function prepareOutput, you would see this code section related to the final display of a product that has a sale:
Code:
case ($_POST['pspClass'] == "productSalePrice"):
$this->prefix = PRODUCT_PRICE_SALE;
$this->preDiscPrefix = PRODUCT_PRICE_SALE;
Basically you will want to provide different text (right side) for the last line of code provided above. This can be done by adding another language definition for the plugin such as UPDATER_PREFIX_SALE_DISCOUNT_TEXT, add the define to the language file, then replace the second use of the above PRODUCT_PRICE_SALE with the above UPDATER_PREFIX_SALE_DISCOUNT_TEXT and then should be fine.
I wanted to provide such definitions for each entry, but the realized that searching for the text to change it would return many entries or I would have to put text in for all of them that was different and more than likely undesirable anyways. :) The third option which is needed regardless is to offer more instruction about how to use/modify the results to get something more desirable.
For comparison of what the store did as compared to what it will, looks like you will want a prefix for the pre-discount price of empty single quotes: ''.
So, in: includes/languages/english/extra_definitions/dynamic_price_updater.php
Add:
Code:
define('UPDATER_PREFIX_SALE_DISCOUNT_TEXT', '');
Then in the class file at line 116, change:
Code:
$this->preDiscPrefix = PRODUCT_PRICE_SALE;
To:
Code:
$this->preDiscPrefix = UPDATER_PREFIX_SALE_DISCOUNT_TEXT;
That should resolve your situation for sale product.