-
Re: Dynamic Price Updater
Quote:
Originally Posted by
Calljj
Changed code,no difference.
happening on all browsers.
Done a little more leg work... Looks like there might be an extra "blank" line somewhere in the process.
Check the following file to ensure that before the first <?php that there is no "hidden" character or return. If necessary delete the entire first line and retype the text of that line using your favorite plain text editor. Or should be able to copy the file from the latest distribution or from github.
includes/classes/ajax/zcDPU_Ajax.php
Also be sure that there is no closing ?> in the files. Having such a closing followed by a return could cause the same issue.
Further, I highly suspect the includes/classes/ajax/zcDPU_Ajax.php file as having from a while back the UTF8 BOM (Byte Order Mark) "character" that was accidentally added in when I was working on various filetypes some time ago. The file may look the same as the current version, but it is not and it will cause the problem described. I'll try to see if there is anything there in the current fileset, but if installation was done by comparison, then that character may have been missed. It is not a visible character like the text on this screen, but it would provide the opening content of the responseText where it shows: \r\n\ufeff
Once the responseText is "parsed" it turns that section into a carriage returned new line with the BOM character being the first character on the second line that is causing the issue.
Whatever method you use, could you please explain what was tried, what worked, and what didn't? I know someone else was having a somewhat similar problem, but it hadn't dawned on me as much about what was going on.
-
Re: Dynamic Price Updater - SOLVED
Quote:
Originally Posted by
mc12345678
Further, I highly suspect the includes/classes/ajax/zcDPU_Ajax.php file as having from a while back the UTF8 BOM (Byte Order Mark) "character" that was accidentally added in when I was working on various filetypes some time ago.
So problem finally solved!
I would never have even thought of looking at the encoding issues of a file, the first time i've come across such an issue!
Indeed, it was not a character that was the issue, but the entire includes/classes/ajax/zcDPU_Ajax.php file being encoded in UTF8-BOM.
I opened the file in notepad++, changed the encoding to standard UTF8 and saved, and worked instantly!
Thank you again for your patience.
-
Re: Dynamic Price Updater - taxation
OK, on to the next thing :D
sooo..... when a product is on sale, how do i get the "normalprice" to include the taxtation?
At the moment it gives:
Code:
Price: £649.17 £467.40
Save: 40% off
-
Re: Dynamic Price Updater - taxation
Quote:
Originally Posted by
Calljj
OK, on to the next thing :D
sooo..... when a product is on sale, how do i get the "normalprice" to include the taxtation?
At the moment it gives:
Code:
Price: £649.17 £467.40
Save: 40% off
forgot to say, product price "zero", product priced by attributes.
-
Re: Dynamic Price Updater - taxation
Sorry, been trying to knock down strict reporting notices and warnings with ZC 1.5.6a and other coding issues such as tidying up code.
Yes, there is a "proposal" in the github found at: https://github.com/mc12345678/Dynami...195351319d5460
I intend to include it in the next version release: https://github.com/mc12345678/Dynami...ter/tree/3.2.1 but have been working through a few issues. One of which is of interest is to conquer any flashing values as a result of typing text. Would like (if the replace value with an image is chosen) to be able to set a timer to not allow the flash to occur. Some of this is incorporated in this branch that is to also go into the next release: https://github.com/mc12345678/Dynami...-reduce-events
To see what each of those added/removed as compared to the current master branch, the first:
https://github.com/mc12345678/Dynami...master...3.2.1
The second:
https://github.com/mc12345678/Dynami...-reduce-events
They are not (yet) on the same branch so comparing them would be of limited value.
-
Re: Dynamic Price Updater - taxation
Quote:
Originally Posted by
mc12345678
many thanks, the link provided the solution i needed
-
2 Attachment(s)
Re: Price Updater
hi, the plugin works perfectly, but I have a problem with the full price display.
the discounted price I see included taxes, while the full price I see it without taxes, is a problem of the plugin, because if I disable the plugin, I see the prices correctly, what can I do?
I put two images that can help
image without plugins, prices with correct fees.
Attachment 18335
image with plugin promotional price corrected with fees, while full price without tax.
Attachment 18336
thanks to everyone who will help me
-
Re: Price Updater
Quote:
Originally Posted by
echexxxxxxxx10
hi, the plugin works perfectly, but I have a problem with the full price display.
the discounted price I see included taxes, while the full price I see it without taxes, is a problem of the plugin, because if I disable the plugin, I see the prices correctly, what can I do?
I put two images that can help
image without plugins, prices with correct fees.
Attachment 18335
image with plugin promotional price corrected with fees, while full price without tax.
Attachment 18336
thanks to everyone who will help me
Issue was discussed a couple of posts back with solution provided at: https://github.com/mc12345678/Dynami...195351319d5460
-
Re: Price Updater
Quote:
Originally Posted by
mc12345678
thank you very much
-
Re: Price Updater
just a little php7 issue:
Code:
PHP Warning: Use of undefined constant DPU_OUT_OF_STOCK_IMAGE - assumed 'DPU_OUT_OF_STOCK_IMAGE'
But.... is it possible to not show a zero price, or show an "out of stock"?
I already have "sold out" on the "add to cart" button, so just want it to display price as normal...
-
Re: Price Updater
Hi;
I'm building a website using version 1.5.5f, I installed Dynamic Price Updater and is working good, I also installed Product Attribute Grid, but when I change the values on the grid it doesn't update the price; I've been reading through the post and I found a couple of people asking the same question, but I could'n find the answer. Can somebody please help me with this issue or point me in the right direction?
I would really appreciate it.
You can see the website here: http://supershirt.ca/t-shirts/short-...-t-shirt.-2000
This only a test product.
Thanks,
-
Re: Price Updater
Quote:
Originally Posted by
Calljj
just a little php7 issue:
Code:
PHP Warning: Use of undefined constant DPU_OUT_OF_STOCK_IMAGE - assumed 'DPU_OUT_OF_STOCK_IMAGE'
But.... is it possible to not show a zero price, or show an "out of stock"?
I already have "sold out" on the "add to cart" button, so just want it to display price as normal...
Possible, yes, would expect. Apparently haven't finished off the stock update aspect otherwise there would be something assigned to that "missing" constant.
To be sure that am working on the right thing(s), could you please either explain what you are seeing and what conditions are necessary to recreate it, or provide a link to a problem product about which I may still have similar questions?
As to the variable/constant assignment, I tried to incorporate something that could be displayed in proximity to the existing information or to replace it. I tried to leave the constant open for assignment to maybe include what you are asking which is to still show the original price. As to the price of zero, that's where understanding the configuration comes into play.
-
Re: Price Updater
how i do i get it to show the price i set in attributes, for instance i dont use the + or - symbols, i delete them than input the price i sell it for. but this mod still adds to normal. my price + normal, not what i want how can this be changed
-
Re: Price Updater
-
Re: Price Updater
Quote:
Originally Posted by
jimmie
how i do i get it to show the price i set in attributes, for instance i dont use the + or - symbols, i delete them than input the price i sell it for. but this mod still adds to normal. my price + normal, not what i want how can this be changed
The price result presented is the price that the customer is expected to see when the shopping cart is displayed. So addition versus price replacement is dependent on the setup of the product and the associated attribute(s). In a default ZenCart install any symbol (or absence of) other than a minus (-) will "add" the value. To what it adds is debatable, but a minus will subtract.
Quote:
Originally Posted by
jimmie
Further to the above, the price shown when making changes on this page is to show how much the item/selection is to cost. This includes a determination of considering other equivalent product already in the cart. The idea is that for example if there are quantity discounts (buy 20 and the price per product decreases by $2). Then it is possible as a customer to see what the price is expected to be when adding the product.
As to whether or where the price is displayed, that depends primarily on the css and identification in the configuration settings.
-
Re: Price Updater
are you saying i cant turn the multiplier off
-
Re: Price Updater
Quote:
Originally Posted by
jimmie
are you saying i cant turn the multiplier off
There is currently no built in way to turn the multiplication off. If were wanting that, then I envision that would have to back calculate the per product cost which would likely introduce rounding errors in the display. An extreme example: buy one product for 0.04, get one for 0.01 extra. Price per product: 0.025 or 0.03 for currencies that have only 2 decimals... then the customer may seem like they have a discount, but if the math worked out with more product to round down instead, in their head they would think that they were getting a discount when in actuality they would still get charged the additional amount when they go to the cart and checkout...
A second way to approach it is: does the shopping cart ignore the quantity or do they still get charged by the $ultiplication?
A third approach: what business need is trying to be met. Ie. Why should the product price not be multiplied by the quantity of product to be added?
To otherwise answer the question: no not saying that it can't be done, anything can be done with the software. It's open source and can be modified to suit...
-
Re: Price Updater
i can probably live with the standard way it mutiplies + -, what about turning off the total product price display anyway to not have it mutiply before adding to cart
-
Re: Price Updater
also noticed that my stock and instock as well as free shipping pics disapear or change upon price change, if i turn off price updater it works as should
https://jnsflooringandsupplies.com/i...roducts_id=160
-
Re: Price Updater
Quote:
Originally Posted by
jimmie
Because javascript is involved, before turning it on, be sure that your page passes validation. Otherwise actions like to make a section "disappear" may make more than intended disappear. With no magical recreation technique it may remain absent until a new page load.
-
Re: Price Updater
this is the code to turn on or off my custom pics
Code:
<!--bof not in JNS Flooring and Supplies stock icon -->
<?php if ($products_quantity <= 0) { ?>
<?php echo TEXT_PRODUCT_NOT_IN_STOCK; ?>
<?php } ?>
<!--eof not in JNS Flooring and Supplies stock icon --> this one dissapears after price updater refeshes its price
Code:
<!--bof free ship Freight icon -->
<?php if($product->fields['product_is_always_free_shipping'] == 3) { ?>
<div id="freeShippingunder"><?php echo TEXT_PRODUCT_FREE_SHIPPING_FREIGHT; ?></div>
<?php } ?>
<!--eof free ship Freight icon -->
this 1 still shows
-
Re: Price Updater
figured it out i had moved this </h2> to after, moved it to b4
-
Re: Price Updater
Quote:
Originally Posted by
jimmie
figured it out i had moved this </h2> to after, moved it to b4
Hopefully when that got moved, all of the other tags that were still open got closed in the reverse order. Though, looking at the source code, that does not appear to be the case at least in the beginning of the whole thing:
Code:
<!--bof Product Price block -->
<h2 id="productPrices" class="productGeneral">
<span id="retail">Price: $125.69</h2>
<!--eof Product Price block -->
The span is still open when the h2 that contained it is now closed...
That is part of what I was talking about regarding passing html validation.
Regarding ignoring the quantity box, there are basically two conditions to consider: 1) do you want calculation to consider the need to order a minimum quantity for any product, 2) do you want all prices affected to be based on a quantity of 1.
Further could force all product to automatically only consider the addition of a set quantity and remove the quantity box from the customer, but that potentially affects how your customers "shop".
The line of code that evaluates the user entered quantity is found in: includes/classes/dynamic_price_updater.php
And is similar to this in several locations:
Code:
$this->shoppingCart->contents[$products_id] = array('qty' => (convertToFloat($_POST['cart_quantity']) <= 0 ? zen_get_buy_now_qty($products_id) : convertToFloat($_POST['cart_quantity'])));
The key part of finding the location(s) to edit are where 'qty' is used and assigning the value to be used. Currently it checks the number entered, if it is less than the minimum allowed then the minimum is used (final purchase requires the minimum), if it exceeds the minimum then basically the value entered is used. You may want to use 1 regardless...
-
Re: Price Updater
I've recently updated to ZC 1.5.6b and also had some updates to my theme template (that came bundled with Dynamic Price Updater). Server is running PHP 7.1.5. I'm getting the following Debug error when DPU is turned on (on the product page there's a loading indicator where a sale price of an item should be). I've checked all the DPU related files with the most recent plugin package and everything seems to match, so I'm at a loss where to look.
Code:
[05-Jun-2019 11:25:03 EST5EDT] PHP Fatal error: Uncaught Error: Class 'DPU' not found in /X/X/X/public_html/XXX//catalog/includes/classes/ajax/zcDPU_Ajax.php:10
Stack trace:
#0 /X/X/X/public_html/XXX//catalog/ajax.php(85): zcDPU_Ajax->dpu_update()
#1 {main}
thrown in /X/X/X/public_html/XXX//catalog/includes/classes/ajax/zcDPU_Ajax.php on line 10
[05-Jun-2019 11:25:03 EST5EDT] Request URI: /catalog/ajax.php?products_id=1004&cPath=34_93_38&number_of_uploads=0&act=DPU_Ajax&method=dpu_update, IP address: 67.245.196.78
--> PHP Fatal error: Uncaught Error: Class 'DPU' not found in /X/X/X/public_html/XXX//catalog/includes/classes/ajax/zcDPU_Ajax.php:10
Stack trace:
#0 /X/X/X/public_html/XXX//catalog/ajax.php(85): zcDPU_Ajax->dpu_update()
#1 {main}
thrown in /X/X/X/public_html/XXX//catalog/includes/classes/ajax/zcDPU_Ajax.php on line 10.
-
Re: Price Updater
Quote:
Originally Posted by
gwynwyffar
I've recently updated to ZC 1.5.6b and also had some updates to my theme template (that came bundled with Dynamic Price Updater). Server is running PHP 7.1.5. I'm getting the following Debug error when DPU is turned on (on the product page there's a loading indicator where a sale price of an item should be). I've checked all the DPU related files with the most recent plugin package and everything seems to match, so I'm at a loss where to look.
Code:
[05-Jun-2019 11:25:03 EST5EDT] PHP Fatal error: Uncaught Error: Class 'DPU' not found in /X/X/X/public_html/XXX//catalog/includes/classes/ajax/zcDPU_Ajax.php:10
Stack trace:
#0 /X/X/X/public_html/XXX//catalog/ajax.php(85): zcDPU_Ajax->dpu_update()
#1 {main}
thrown in /X/X/X/public_html/XXX//catalog/includes/classes/ajax/zcDPU_Ajax.php on line 10
[05-Jun-2019 11:25:03 EST5EDT] Request URI: /catalog/ajax.php?products_id=1004&cPath=34_93_38&number_of_uploads=0&act=DPU_Ajax&method=dpu_update, IP address: 67.245.196.78
--> PHP Fatal error: Uncaught Error: Class 'DPU' not found in /X/X/X/public_html/XXX//catalog/includes/classes/ajax/zcDPU_Ajax.php:10
Stack trace:
#0 /X/X/X/public_html/XXX//catalog/ajax.php(85): zcDPU_Ajax->dpu_update()
#1 {main}
thrown in /X/X/X/public_html/XXX//catalog/includes/classes/ajax/zcDPU_Ajax.php on line 10.
Oye, that's a new one...
First off, I see the above paths; however, noting that a portion of the path was replaced with x's did the original path have two forward slashes back-to-back like that? If so, then there may be an issue related to that, if not, let's continue.
What is effectively reported is that the DPU class is not being loaded by ajax.php when calling to require includes/application_top.php
Which seems to indicate that the file: includes/auto_loaders/config.dynamic_price_updater.php is not in place, or if it is, that the template/store is using an auto_loader prefix other than config.
That latter is possible, but not normal.
I would ask if the same issue occurs when temporarily using one of the default templates, but that requires putting the includes/templates files in the corresponding directory basically.
Initially I was thinking that perhaps the necessary jscript template file wasn't present, but the ajax class was loaded. :/ if the file wasn't present then the built in XHR would have kicked in, if it was then the zcJS variable would be used...
Other than checking that the necessary files are present, I would have to suggest looking at what other files are installed or where modified what the change(s) did.
Could PM the address to see if I might see something of assistance.
-
Re: Price Updater
I apologize, those double slashes were my sloppy find/replace. The file paths are correct.
The includes/auto_loaders/config.dynamic_price_updater.php is in place
In terms of file changes, there were only 2 that were changed for the template update.
includes/languages/english/extra_definitions/yourstore/dynamic_price_updater.php
includes/modules/pages/product_info/jscript_dynamic_price_updater.php
I've attached the files here.Attachment 18482
Let me know if you see anything there, otherwise I can PM FTP/login info to let you look further. Thanks for your help!
-
Re: Price Updater
Quote:
Originally Posted by
gwynwyffar
I apologize, those double slashes were my sloppy find/replace. The file paths are correct.
The includes/auto_loaders/config.dynamic_price_updater.php is in place
In terms of file changes, there were only 2 that were changed for the template update.
includes/languages/english/extra_definitions/yourstore/dynamic_price_updater.php
includes/modules/pages/product_info/jscript_dynamic_price_updater.php
I've attached the files here.
Attachment 18482
Let me know if you see anything there, otherwise I can PM FTP/login info to let you look further. Thanks for your help!
FYI, the attachment is considered invalid. Not sure why, but unable to download it. PM may be necessary.
-
Re: Price Updater
Quote:
Originally Posted by
mc12345678
Possible, yes, would expect. Apparently haven't finished off the stock update aspect otherwise there would be something assigned to that "missing" constant.
To be sure that am working on the right thing(s), could you please either explain what you are seeing and what conditions are necessary to recreate it, or provide a link to a problem product about which I may still have similar questions?
As to the variable/constant assignment, I tried to incorporate something that could be displayed in proximity to the existing information or to replace it. I tried to leave the constant open for assignment to maybe include what you are asking which is to still show the original price. As to the price of zero, that's where understanding the configuration comes into play.
Any progress on this? as the constant DPU_SHOW_OUT_OF_STOCK_IMAGE is still undefined.
-
Re: Price Updater
in the code there is this:
Quote:
switch (true) {
case ($this->product_stock > 0): // No consideration made yet on allowing quantity to go less than 0.
$this->responseText['stock_quantity'] = $this->product_stock;
break;
case (true):
$out_of_stock = false;
if ((STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true')) {
$out_of_stock = true;
}
case ($out_of_stock && $this->num_options == $this->unused && !empty($this->new_temp_attributes)):
etc.
I don't get the logic behind the second case (true):
or rather don't find a similar construct on the web to explain its use here....
-
Re: Price Updater
Quote:
Originally Posted by
torvista
in the code there is this:
I don't get the logic behind the second case (true):
or rather don't find a similar construct on the web to explain its use here....
So, unfortunately the code segment didn't carry over to this post (quoted text maybe?), but at the time of development/incorporation, the thought was: there was no need for $out_of_stock to be defined if there was stock. But, it would be needed for the cases beyond.
The select criteria is set to act on case statements that are true. Therefore if the first case is false the next case is evaluated. The second case evaluates to true by default and is processed. The absence of a break causes the third and subsequent cases to be evaluated until true with a break that follows or default is reached.
Further because the $out_of_stock variable made up part of the "if" structure, I was trying to keep it a part of the logic rather than either pulling it completely out to a separate statement or to repeat the code at each subsequent case. This way the processing logic would be fully contained to this dropdown structure rather than separate parts that would have to be maintained together.
Typical examples would show some part of each of these aspects which were grouped together to give this select structure.
So, besides the interest in its presence, what issue(s) are trying to be resolved?
-
Re: Price Updater
Quote:
Originally Posted by
Design75
Any progress on this? as the constant DPU_SHOW_OUT_OF_STOCK_IMAGE is still undefined.
Regarding this, I'm thinking that will define as %s and then allow the DPU class and/or perhaps the script on the final page to provide substitution of the text through the use of the sprintf function.
-
Re: Price Updater
Quote:
what issue(s) are trying to be resolved?
The debug log due to the missing constant DPU_OUT_OF_STOCK_IMAGE
I've rejigged that switch to check first for that constant, removed all these unnecessary
Quote:
defined('DPU_SHOW_OUT_OF_STOCK_IMAGE).
since this is part of the install.
Then I was pondering over the logic of the section. I don't really get how the out of stock stuff should work/what it is trying to do and since I don't use it I won't be investing any more time in it.
Normally I would try and improve things but I have too much to do already. I think the readme could do with more info.
-
Re: Price Updater
Quote:
Originally Posted by
Calljj
just a little php7 issue:
Code:
PHP Warning: Use of undefined constant DPU_OUT_OF_STOCK_IMAGE - assumed 'DPU_OUT_OF_STOCK_IMAGE'
Any solution on this yet. Checked github and nothing there.
-
Re: Price Updater
I stuck it in the class
includes/classes/dynamic_price_updater.php
PHP Code:
$this->responseText['stock_quantity'] = $this->product_stock;
define('DPU_OUT_OF_STOCK_IMAGE', '');//steve missing: https://www.zen-cart.com/showthread.php?70577-Dynamic-Price-Updater&p=1355225#post1355225
if (defined(DPU_OUT_OF_STOCK_IMAGE)) {
-
Re: Price Updater
THANX
I put it in includes/languages/english/extra_definitions/dynamic_price_updater.php to maintain uniformity.
-
Re: Dynamic Price Updater - taxation
Hi
Is Dynamic Price Updater compatible with ZenCart 1.5.6?
-
Re: Dynamic Price Updater - taxation
Quote:
Originally Posted by
dharrison
Hi
Is Dynamic Price Updater compatible with ZenCart 1.5.6?
Fourth time at trying to post this...
Yes and no. As reported recently in this thread, the version available here will likely throw a myDebug file for the lack of definition associated with stock quantities; however, version 3.2.1: https://github.com/mc12345678/Dynami...ter/tree/3.2.1 has (or should by now have) a definition included that displays quantities available associated with the product quantity lookup (meaning when using Stock By Attributes it should narrow down the available quantity based on selections made); however, it looks like if no selections have been made the initial stock message incorrectly identifies that the product is out of stock, but updates when selections have been made. I expect some alternate text to be displayed or the total quantity of the product, but either/both of those are dependent on how the store uses such quantities. Anyways, that feature can be turned off also to not cause confusion to the customer.
-
Re: Price Updater
HI Mc
It works ok. I'm upgrading the live site tomorrow (I hope!) but I have a question: If say you go to https://sitstandforbusiness.com/fund...ent-p-113.html, We have the inc VAT price howing as well as the ex VAT price. However on the new version these get overriden by the Your Price and the unit price.
How can I prevent the inc/ex VAT prices being hidden and replaced with the Your Price? Please advise.
-
Re: Price Updater
Quote:
Originally Posted by
dharrison
HI Mc
It works ok. I'm upgrading the live site tomorrow (I hope!) but I have a question: If say you go to
https://sitstandforbusiness.com/fund...ent-p-113.html, We have the inc VAT price howing as well as the ex VAT price. However on the new version these get overriden by the Your Price and the unit price.
How can I prevent the inc/ex VAT prices being hidden and replaced with the Your Price? Please advise.
Sorry that do not have all of the details together yet; however, I did today go to that product and saw the spinning graphic did not replace the existing values, but instead was shown off to the side.
So, first things first, currently the module returns only one price, either with tax included or without tax included based on the settings for the display of price on the catalog side. Further, the returned price is expected to take the place of the associated product's price value based on identifying the id for the html parameter that is to hold that price. The implementation of the Includes/Excludes VAT that I saw on the site, also offers a separate identifier for the price that contains the Tax'd value. The DPU class could return two fields instead of just one to provide both the taxed and non-taxed value, with the javascript to process not only the returned value, but to also identify to what location it should be assigned (thought I remembered the module supporting display of the information in either sequence of non-taxed first with taxed to follow or vice versa). These additional "options" may introduce additional classes/ids of concern to handle in different ways... I know that at one point I had begun to incorporate the likes of that module or an older one, but other aspects of the software were more important and I had to put that aside at least as a solution for all versus incorporating a limited correction. Hope the launch is going well!
-
Re: Price Updater
Hi MC
Quote:
Originally Posted by
mc12345678
Sorry that do not have all of the details together yet; however, I did today go to that product and saw the spinning graphic did not replace the existing values, but instead was shown off to the side.
The live site at present hasn't been updated. Everything I am doing is on my test server.
Quote:
Originally Posted by
mc12345678
So, first things first, currently the module returns only one price, either with tax included or without tax included based on the settings for the display of price on the catalog side. Further, the returned price is expected to take the place of the associated product's price value based on identifying the id for the html parameter that is to hold that price.
Yes that's correct. And it does work when I updated this site to 1.55f but on the updated 1.5.6c the prices for Inc and Ex VAT show normally, then when the page is loaded, they are superseded by the Updater (was labelled At least, I renamed it price).
Quote:
Originally Posted by
mc12345678
The DPU class could return two fields instead of just one to provide both the taxed and non-taxed value, with the javascript to process not only the returned value, but to also identify to what location it should be assigned (thought I remembered the module supporting display of the information in either sequence of non-taxed first with taxed to follow or vice versa). These additional "options" may introduce additional classes/ids of concern to handle in different ways... I know that at one point I had begun to incorporate the likes of that module or an older one, but other aspects of the software were more important and I had to put that aside at least as a solution for all versus incorporating a limited correction.
Yes that's exactly what the current site does and I would love to be able to recreate this for the new site. The launch is pretty much ready to go, except for this and a separate issue.
I hope you can help. :)
-
Re: Price Updater
In fact, I think it would be easier for me to make the site live, so you can see what the issue is.
-
Re: Price Updater
Quote:
Originally Posted by
dharrison
Hi MC
The live site at present hasn't been updated. Everything I am doing is on my test server.
Yes that's correct. And it does work when I updated this site to 1.55f but on the updated 1.5.6c the prices for Inc and Ex VAT show normally, then when the page is loaded, they are superseded by the Updater (was labelled At least, I renamed it price).
Yes that's exactly what the current site does and I would love to be able to recreate this for the new site. The launch is pretty much ready to go, except for this and a separate issue.
I hope you can help. :)
Looked again at the source code generated on the page and see that the current display doesn't have discreet divisions between each of the text items, so just returning different values for tax/non-tax. It appears, that instead would need to return the full text to be displayed as a single value.
To try to do that, I went to search for a module that expressed compatibility with any recent version of Zen Cart. While I suspect the one I found would be compatible, I wanted to ask what module is being used so that perhaps I could use its results for the returned value instead of trying to do some sort of javascript muddling.
-
2 Attachment(s)
Re: Price Updater
What I had been using was Dyanmic price Updater and https://www.zen-cart.com/downloads.p...=597&styleid=4 (which I know is a bit out of date).
It does show on my test site
Attachment 18898
and then when the page is fully loaded, it replaces with this
Attachment 18899
The piricing for both did update when options/quantities were changed.
I hope this helps. Please do let me know if you would prefer to see the site live.
-
Re: Price Updater
Hi MC
I have just launched the upgraded website. Hopefully you can now see what I do.
https://sitstandforbusiness.com/fund...ent-p-113.html
-
Re: Price Updater
Quote:
Originally Posted by
dharrison
Having looked at the code for the include/exclude VAT pricing and the source code of the now live site (which appeared similar to the previous page in the area of concern), to replicate the results of the module in DPU requires basically incorporation of that price display content into DPU which I would see to be done in the DPU class. Unfortunately the other module doesn't provide a sort of "slip in/out" capability for displaying the price as it depends on the product's id as the source, not the selections and possible selections as used by DPU.
What that ultimately means is that there will be two places in the code that would determine the content to be displayed instead of using a single piece of code to create the output based on essential input... I'll see what I can pull together and provide the github location to incorporate the additional code.
Ideally, the other module would get updated to split the "display" out possibly or some other variation to where a single input is needed for the existing function but some other code could be accessed such that when given specific data that it outputs consistent with the existing format and/or offer the ability to customize it...
-
Re: Price Updater
Thanks MC Numbers.
I welcome any help. :)
-
Re: Price Updater
Ran across an issue if ZC requires main_page to be on the web address when products_id is present (new condition for ZC 1.5.7). As written, the ajax query has been passing products_id in the web address so that other operations can be performed using that information. While it is possible to add main_page to the ajax query request, it is not required and can be omitted through this related commit that maintains the overall information and operation but does away with the additional information on the product information page.
The general symptom observed is that the page continuously reloads, especially on changing a selection on the page.
https://github.com/mc12345678/Dynami.../pull/22/files
-
Re: Price Updater
zc 156c
dpu 3.2.0
Dynamic Price Updater (Update Check) set FALSE
why is DPU trying to "phone home"? and generating adm debug files
Isn't 'phone home' code frowned upon?
what does it take to disable this check since the switch doesn't appear to work as expected?
Code:
[30-May-2020 12:49:15 America/Los_Angeles] Request URI: /MYADMINFOLDER/configuration.php?gID=56&cID=2151, IP address: MY_IP_ADDRESS
#1 trigger_error() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:138]
#2 this_plugin_version_check_for_updates() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:185]
#3 require(/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php) called at [/home/HostName/public_html/includes/autoload_func.php:48]
#4 require(/home/HostName/public_html/includes/autoload_func.php) called at [/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php:171]
#5 require(/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php) called at [/home/HostName/public_html/MYADMINFOLDER/configuration.php:9]
--> PHP Notice: CURL error checking plugin versions: 7:Failed to connect to plugins.zen-cart.com port 443: Connection refused
Trying http instead. in /home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php on line 138.
[30-May-2020 12:49:16 America/Los_Angeles] Request URI: /MYADMINFOLDER/configuration.php?gID=56&cID=2151, IP address: MY_IP_ADDRESS
#1 trigger_error() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:145]
#2 this_plugin_version_check_for_updates() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:185]
#3 require(/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php) called at [/home/HostName/public_html/includes/autoload_func.php:48]
#4 require(/home/HostName/public_html/includes/autoload_func.php) called at [/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php:171]
#5 require(/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php) called at [/home/HostName/public_html/MYADMINFOLDER/configuration.php:9]
--> PHP Notice: CURL error checking plugin versions: 7:Failed to connect to plugins.zen-cart.com port 80: Connection refused
Trying www instead. in /home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php on line 145.
[30-May-2020 12:49:17 America/Los_Angeles] Request URI: /MYADMINFOLDER/configuration.php?gID=56&cID=2151, IP address: MY_IP_ADDRESS
#1 trigger_error() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:157]
#2 this_plugin_version_check_for_updates() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:185]
#3 require(/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php) called at [/home/HostName/public_html/includes/autoload_func.php:48]
#4 require(/home/HostName/public_html/includes/autoload_func.php) called at [/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php:171]
#5 require(/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php) called at [/home/HostName/public_html/MYADMINFOLDER/configuration.php:9]
--> PHP Notice: CURL error checking plugin versions: 7:Failed to connect to www.zen-cart.com port 80: Connection refused
Trying file_get_contents() instead. in /home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php on line 157.
[30-May-2020 12:49:18 America/Los_Angeles] Request URI: /MYADMINFOLDER/configuration.php?gID=56&cID=2151, IP address: MY_IP_ADDRESS
#1 file_get_contents() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:159]
#2 this_plugin_version_check_for_updates() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:185]
#3 require(/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php) called at [/home/HostName/public_html/includes/autoload_func.php:48]
#4 require(/home/HostName/public_html/includes/autoload_func.php) called at [/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php:171]
#5 require(/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php) called at [/home/HostName/public_html/MYADMINFOLDER/configuration.php:9]
--> PHP Warning: file_get_contents(https://plugins.zen-cart.com/versioncheck/1301): failed to open stream: Connection refused in /home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php on line 159.
[30-May-2020 12:49:18 America/Los_Angeles] Request URI: /MYADMINFOLDER/configuration.php?gID=56&cID=2151, IP address: MY_IP_ADDRESS
#1 trigger_error() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:161]
#2 this_plugin_version_check_for_updates() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:185]
#3 require(/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php) called at [/home/HostName/public_html/includes/autoload_func.php:48]
#4 require(/home/HostName/public_html/includes/autoload_func.php) called at [/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php:171]
#5 require(/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php) called at [/home/HostName/public_html/MYADMINFOLDER/configuration.php:9]
--> PHP Notice: file_get_contents() error checking plugin versions.
Trying http instead. in /home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php on line 161.
[30-May-2020 12:49:19 America/Los_Angeles] Request URI: /MYADMINFOLDER/configuration.php?gID=56&cID=2151, IP address: MY_IP_ADDRESS
#1 file_get_contents() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:162]
#2 this_plugin_version_check_for_updates() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:185]
#3 require(/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php) called at [/home/HostName/public_html/includes/autoload_func.php:48]
#4 require(/home/HostName/public_html/includes/autoload_func.php) called at [/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php:171]
#5 require(/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php) called at [/home/HostName/public_html/MYADMINFOLDER/configuration.php:9]
--> PHP Warning: file_get_contents(http://plugins.zen-cart.com/versioncheck/1301): failed to open stream: Connection refused in /home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php on line 162.
[30-May-2020 12:49:19 America/Los_Angeles] Request URI: /MYADMINFOLDER/configuration.php?gID=56&cID=2151, IP address: MY_IP_ADDRESS
#1 trigger_error() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:165]
#2 this_plugin_version_check_for_updates() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:185]
#3 require(/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php) called at [/home/HostName/public_html/includes/autoload_func.php:48]
#4 require(/home/HostName/public_html/includes/autoload_func.php) called at [/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php:171]
#5 require(/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php) called at [/home/HostName/public_html/MYADMINFOLDER/configuration.php:9]
--> PHP Notice: file_get_contents() error checking plugin versions.
Aborting. in /home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php on line 165.
-
Re: Price Updater
Not sure what goes wrong, but the "phone home" is Zen Cart default code. Not something build in to the module. Zen Cart checks the module for updates on the zen cart site, but on your site that is not working.
Quote:
Originally Posted by
RixStix
zc 156c
dpu 3.2.0
Dynamic Price Updater (Update Check) set
FALSE
why is DPU trying to "phone home"? and generating adm debug files
Isn't 'phone home' code frowned upon?
what does it take to disable this check since the switch doesn't appear to work as expected?
Code:
[30-May-2020 12:49:15 America/Los_Angeles] Request URI: /MYADMINFOLDER/configuration.php?gID=56&cID=2151, IP address: MY_IP_ADDRESS
#1 trigger_error() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:138]
#2 this_plugin_version_check_for_updates() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:185]
#3 require(/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php) called at [/home/HostName/public_html/includes/autoload_func.php:48]
#4 require(/home/HostName/public_html/includes/autoload_func.php) called at [/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php:171]
#5 require(/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php) called at [/home/HostName/public_html/MYADMINFOLDER/configuration.php:9]
--> PHP Notice: CURL error checking plugin versions: 7:Failed to connect to plugins.zen-cart.com port 443: Connection refused
Trying http instead. in /home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php on line 138.
[30-May-2020 12:49:16 America/Los_Angeles] Request URI: /MYADMINFOLDER/configuration.php?gID=56&cID=2151, IP address: MY_IP_ADDRESS
#1 trigger_error() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:145]
#2 this_plugin_version_check_for_updates() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:185]
#3 require(/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php) called at [/home/HostName/public_html/includes/autoload_func.php:48]
#4 require(/home/HostName/public_html/includes/autoload_func.php) called at [/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php:171]
#5 require(/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php) called at [/home/HostName/public_html/MYADMINFOLDER/configuration.php:9]
--> PHP Notice: CURL error checking plugin versions: 7:Failed to connect to plugins.zen-cart.com port 80: Connection refused
Trying www instead. in /home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php on line 145.
[30-May-2020 12:49:17 America/Los_Angeles] Request URI: /MYADMINFOLDER/configuration.php?gID=56&cID=2151, IP address: MY_IP_ADDRESS
#1 trigger_error() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:157]
#2 this_plugin_version_check_for_updates() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:185]
#3 require(/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php) called at [/home/HostName/public_html/includes/autoload_func.php:48]
#4 require(/home/HostName/public_html/includes/autoload_func.php) called at [/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php:171]
#5 require(/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php) called at [/home/HostName/public_html/MYADMINFOLDER/configuration.php:9]
--> PHP Notice: CURL error checking plugin versions: 7:Failed to connect to www.zen-cart.com port 80: Connection refused
Trying file_get_contents() instead. in /home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php on line 157.
[30-May-2020 12:49:18 America/Los_Angeles] Request URI: /MYADMINFOLDER/configuration.php?gID=56&cID=2151, IP address: MY_IP_ADDRESS
#1 file_get_contents() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:159]
#2 this_plugin_version_check_for_updates() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:185]
#3 require(/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php) called at [/home/HostName/public_html/includes/autoload_func.php:48]
#4 require(/home/HostName/public_html/includes/autoload_func.php) called at [/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php:171]
#5 require(/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php) called at [/home/HostName/public_html/MYADMINFOLDER/configuration.php:9]
--> PHP Warning: file_get_contents(https://plugins.zen-cart.com/versioncheck/1301): failed to open stream: Connection refused in /home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php on line 159.
[30-May-2020 12:49:18 America/Los_Angeles] Request URI: /MYADMINFOLDER/configuration.php?gID=56&cID=2151, IP address: MY_IP_ADDRESS
#1 trigger_error() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:161]
#2 this_plugin_version_check_for_updates() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:185]
#3 require(/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php) called at [/home/HostName/public_html/includes/autoload_func.php:48]
#4 require(/home/HostName/public_html/includes/autoload_func.php) called at [/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php:171]
#5 require(/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php) called at [/home/HostName/public_html/MYADMINFOLDER/configuration.php:9]
--> PHP Notice: file_get_contents() error checking plugin versions.
Trying http instead. in /home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php on line 161.
[30-May-2020 12:49:19 America/Los_Angeles] Request URI: /MYADMINFOLDER/configuration.php?gID=56&cID=2151, IP address: MY_IP_ADDRESS
#1 file_get_contents() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:162]
#2 this_plugin_version_check_for_updates() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:185]
#3 require(/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php) called at [/home/HostName/public_html/includes/autoload_func.php:48]
#4 require(/home/HostName/public_html/includes/autoload_func.php) called at [/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php:171]
#5 require(/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php) called at [/home/HostName/public_html/MYADMINFOLDER/configuration.php:9]
--> PHP Warning: file_get_contents(http://plugins.zen-cart.com/versioncheck/1301): failed to open stream: Connection refused in /home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php on line 162.
[30-May-2020 12:49:19 America/Los_Angeles] Request URI: /MYADMINFOLDER/configuration.php?gID=56&cID=2151, IP address: MY_IP_ADDRESS
#1 trigger_error() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:165]
#2 this_plugin_version_check_for_updates() called at [/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php:185]
#3 require(/home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php) called at [/home/HostName/public_html/includes/autoload_func.php:48]
#4 require(/home/HostName/public_html/includes/autoload_func.php) called at [/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php:171]
#5 require(/home/HostName/public_html/MYADMINFOLDER/includes/application_top.php) called at [/home/HostName/public_html/MYADMINFOLDER/configuration.php:9]
--> PHP Notice: file_get_contents() error checking plugin versions.
Aborting. in /home/HostName/public_html/MYADMINFOLDER/includes/init_includes/init_dpu_config.php on line 165.
-
Re: Price Updater
Quote:
Originally Posted by
Design75
Not sure what goes wrong, but the "phone home" is Zen Cart default code. Not something build in to the module. Zen Cart checks the module for updates on the zen cart site, but on your site that is not working.
Not sure that I understand. The switch is set to false, don't check for DPU updates but even then the check that was not expected to happen failed and caused adm-debug files to be generated.
I didn't realize that default zencart code was built into every plugin to phone home regardless of switch setting true/false. Why have a switch setting to check plugin version it is not intended to work?
-
Re: Price Updater
It appears to me that the DPU module is not functioning as expected based upon this comment.
Quote:
// Respect the admin setting for version checking to prevent checking this if the store is disabled. (typically set because the version checker may generate warnings/errors.
The adm debug file creation occurred today on several occassions. Other errors, are the typical undefined_constant errors which seem to be quite frequent since beginning the update to 156c.
-
Re: Price Updater
I just had a better look at the code, and it appears that there is an older version of the "call home function." I already was working on a new version of this mod, so will include this..
The new mod will include updates made by MC123456778, he did the major development, over the last years. My updates are mainly getting the code to the latest standards.
-
Re: Price Updater
Quote:
Originally Posted by
Design75
I just had a better look at the code, and it appears that there is an older version of the "call home function." I already was working on a new version of this mod, so will include this..
The new mod will include updates made by MC123456778, he did the major development, over the last years. My updates are mainly getting the code to the latest standards.
It's not the "age" of the call home that is an issue, but as RixStix has pointed out that regardless the setting it still tries. This goes back to the use of a constant *and* the value of that constant. In this case, the *text* value of false... In a loose comparison (not using === for example), true == 'false' == 'true'..
The test would work even if it were == 'true', but without any comparison the text value of 'false' causes the inner content to be executed.
The "older" version of the call home had been retained because that was the version that worked on older style systems that would not be expected to require or may not support the newer style(s) where newer ZC versions would already have the call home code and that portion of the file would be omitted. Although in webchills' version of ZC, he has removed the call home code and therefore if it is not included in the file such as this, then installation to a fully German based ZC site causes issues in this portion of the code.
Anyways, where:
Code:
constant($module_constant . '_PLUGIN_CHECK')
is present by itself, it could be changed to:
Code:
constant($module_constant . '_PLUGIN_CHECK') == 'true'
Or better still:
Code:
constant($module_constant . '_PLUGIN_CHECK') === 'true'
Would be more understood to mean that it better be that value or else. :)
Sorry for any previous "flippant" attempt to incorporate such a switch. I think it is a common problem across the plugins that use or attempt to offer an independent control for the plugin separate from the ZC control.
-
Re: Price Updater
thx for the clarification.
Quote:
Originally Posted by
mc12345678
It's not the "age" of the call home that is an issue, but as RixStix has pointed out that regardless the setting it still tries. This goes back to the use of a constant *and* the value of that constant. In this case, the *text* value of false... In a loose comparison (not using === for example), true == 'false' == 'true'..
The test would work even if it were == 'true', but without any comparison the text value of 'false' causes the inner content to be executed.
The "older" version of the call home had been retained because that was the version that worked on older style systems that would not be expected to require or may not support the newer style(s) where newer ZC versions would already have the call home code and that portion of the file would be omitted. Although in webchills' version of ZC, he has removed the call home code and therefore if it is not included in the file such as this, then installation to a fully German based ZC site causes issues in this portion of the code.
Anyways, where:
Code:
constant($module_constant . '_PLUGIN_CHECK')
is present by itself, it could be changed to:
Code:
constant($module_constant . '_PLUGIN_CHECK') == 'true'
Or better still:
Code:
constant($module_constant . '_PLUGIN_CHECK') === 'true'
Would be more understood to mean that it better be that value or else. :)
Sorry for any previous "flippant" attempt to incorporate such a switch. I think it is a common problem across the plugins that use or attempt to offer an independent control for the plugin separate from the ZC control.
-
Re: Price Updater
Quote:
Originally Posted by
mc12345678
Anyways, where:
Code:
constant($module_constant . '_PLUGIN_CHECK')
is present by itself, it could be changed to:
Code:
constant($module_constant . '_PLUGIN_CHECK') == 'true'
Or better still:
Code:
constant($module_constant . '_PLUGIN_CHECK') === 'true'
Would be more understood to mean that it better be that value or else. :)
Sorry for any previous "flippant" attempt to incorporate such a switch. I think it is a common problem across the plugins that use or attempt to offer an independent control for the plugin separate from the ZC control.
TNX but for a coding dummy, it would help to know which line and the complete line so that more problems don't occur due to a fatfinger in the edit? I'm guessing that the debug files were only generated because the zencart.com phonehome server was having troubles with accepting the phone call yesterday.
Appears on line 114 and 184
constant($module_constant . '_PLUGIN_CHECK')
-
Re: Price Updater
Both of those are appropriate lines in which to make the change when referring to an unaltered intact fileset. I *am* contemplating the use of != 'false' instead of == 'true'...
-
Re: Price Updater
Quote:
Originally Posted by
mc12345678
Both of those are appropriate lines in which to make the change when referring to an unaltered intact fileset. I *am* contemplating the use of != 'false' instead of == 'true'...
I think it is more of a problem that the zencart plugin server not accepting the phone home attempt.
If you would post the entire lines of code instead of just a snippet of the line, it would make it easier for a non-coder to fix and reduce the potential for an oops.
-
Re: Price Updater
Quote:
Originally Posted by
RixStix
I think it is more of a problem that the zencart plugin server not accepting the phone home attempt.
If you would post the entire lines of code instead of just a snippet of the line, it would make it easier for a non-coder to fix and reduce the potential for an oops.
Here is the PR that incorporates the suggested change: https://github.com/mc12345678/Dynami.../pull/23/files
The red text is where removal occurs, the green text is where insertion is.
The change is based off of the version 3.2.1 proposed distribution, though Design75 is planning to issue the plugin as a 1.5.6 or perhaps 1.5.7 only version which is expected to remove some of the fallback support that has been maintained. For example the DPU class will likely be completely moved into the ajax area instead of being an extra class in the class list. This may mean that the class file currently in the store's catalog would have to be moved/removed to support.
As far as the attempted phone home attempt, it typically is not related to the Zen Cart server or any issue with its ability to communicate but instead the server that is attempting to execute the code as it may not be connected to the internet, https server certificates may not be installed/setup, or there may be some other issue. That's not to say that there occasionally isn't a real issue between the two and unrelated to specifically one or the other, just talking about what is "often" seen.
Anyways, there is no fool proof method to provide changes/suggested changes, so hopefully the above will support your needs and/or way of making changes.
-
Re: Price Updater
Thank you mc12345678
I can understand and make those edits without fearing a catastrophic fatfingered mistake.
The bits and pieces I read, updating to 157 scares the crap out of me.
-
Re: Price Updater
Quote:
Originally Posted by
RixStix
The bits and pieces I read, updating to 157 scares the crap out of me.
I guess it's like the bible. One group reads it and drinking is fine while the other says it's a sin.
Don't read into any info about upgrade without optimism as your glasses. So many things are improved. Many are involved. Nearly decades old bugs are being "found" because more are invited to contribute. Heck, they even let me help here and there.:P
I've found I can swap in 1.5.7 even faster than before and easier than with 1.5.6c. The only thing you have to fear.... Well, you know.
But, it's more about what the owner thinks they need than what they really need. "Gotta have purdy!" "Need geo tags!" Really? So the person can stop buying on line at 2 AM and wait until tomorrow to drive to your store?
But here's just one small part of 1.5.7. Accessibility. Doesn't mean you get more workspace on your desk. It's standards the W3C have set forth worldwide to make it better for everyone to shop. There's a couple of Chrome extensions (Web Developer and Lighthouse) that can make a store owner stop the craziness of thinking the SEs like big, fancy colors and graphics which the SEs will NEVER be able to see. We've been playing with responsive_classic as there still needs to be something for the little guy to use until they can find something "better". And, believe me, I use the term facetiously!.
https://tinyurl.com/yb5b3p36 is a test site for 1.5.7 with no mods and all demo products added. It has all sideboxes and visible settings turned on.
Using Web Developer, the site has no CSS errors except for those in the font-awesome.css that we can't control. And, there's only one HTML warning still to be addressed. Web Developer's Accessibility test gives us no errors (well, occasionally one when the bannerSix doesn't have an alt tag) and, importantly, no contrast errors. The Alerts are really a feature for the responsiv_classic template in that they result from Zen Cart "covering" the page with your product's name. It's Zen Cart's version of, "That number to call, again, is.."
Using Lighthouse, we get a score of 99, 100, 100, 100. Again, the 99 is due to external issues (jQuery and the aforementioned font-awesome.css). We could bring them in house but, you'd have to update once a week. Now, THAT is scary. I've attached an image of the score.
SO.... After all this, what in the world does it have to do with DPU? Actually, a lot. When you add a special/discount, the price is shown with any changes on the product's page and any other page that contains a listing for the product. The original price is lined out and the new price is in red (good old #FF0000). Nearly 10% of the world's population might never see the price. They cannot see red. So, if you look at the Specials Page, you may think the color is a little off but, its setting means the entire world has a better chance of seeing it. Google Web Accessibility Lawsuits. 2017 - #814. 2018 - #2285. 2019 - ~2500+. These are US figures.Attachment 19021
-
Re: Price Updater
Quote:
Originally Posted by
dbltoe
Don't read into any info about upgrade without optimism as your glasses. So many things are improved. Many are involved. Nearly decades old bugs are being "found" because more are invited to contribute. Heck, they even let me help here and there.:P
I understand. It seems as though many 156c questions that are not in the bugs forum are answered by 'go get this file from 157' That's a good thing
Quote:
Originally Posted by
dbltoe
But, it's more about what the owner thinks they need than what they really need. "Gotta have purdy!" "Need geo tags!" Really? So the person can stop buying on line at 2 AM and wait until tomorrow to drive to your store?
We gave up on the really purdy stuff a few years ago... outside of color changes... we don't do BLUE around here and BLUE seems to be the majority favorite.
Quote:
Originally Posted by
dbltoe
But here's just one small part of 1.5.7. Accessibility. Doesn't mean you get more workspace on your desk. It's
standards the W3C have set forth worldwide to make it better for everyone to shop. There's a couple of Chrome extensions (Web Developer and Lighthouse) that can make a store owner stop the craziness of thinking the SEs like big, fancy colors and graphics which the SEs will NEVER be able to see. We've been playing with responsive_classic as there still needs to be something for the little guy to use until they can find something "better". And, believe me, I use the term facetiously!.
https://tinyurl.com/yb5b3p36 is a test site for 1.5.7 with no mods and all demo products added. It has all sideboxes and visible settings turned on.
Using Web Developer, the site has no CSS errors except for those in the font-awesome.css that we can't control. And, there's only one HTML warning still to be addressed. Web Developer's Accessibility test gives us no errors (well, occasionally one when the bannerSix doesn't have an alt tag) and, importantly, no contrast errors. The Alerts are really a feature for the responsiv_classic template in that they result from Zen Cart "covering" the page with your product's name. It's Zen Cart's version of, "That number to call, again, is.."
Using Lighthouse, we get a score of 99, 100, 100, 100. Again, the 99 is due to external issues (jQuery and the aforementioned font-awesome.css). We could bring them in house but, you'd have to update once a week. Now, THAT is scary. I've attached an image of the score.
Can't say we've given that a thought/consideration
Quote:
Originally Posted by
dbltoe
SO.... After all this, what in the world does it have to do with DPU? Actually, a lot. When you add a special/discount, the price is shown with any changes on the product's page and any other page that contains a listing for the product. The original price is lined out and the new price is in red (good old #FF0000). Nearly 10% of the world's population might never see the price. They cannot see red. So, if you look at the Specials Page, you may think the color is a little off but, its setting means the entire world has a better chance of seeing it. Google Web Accessibility Lawsuits. 2017 - #814. 2018 - #2285. 2019 - ~2500+. These are US figures.
Specials/discounted price display is not a big thing for us, nor is the color. With over 1000 attribute combinations possible on a single product sold in fractional units, with some attributes affecting pricing also in fractional units, it is easier for a customer to see what they are getting ready to add to cart instead of being required to add to cart in order to see the price.
The part that scares me is when I read portions of a current plugin is now part of core.... AND what happens to the portion of the plugin that is not core? For a user who might not read everything before they start. That's one thing I have learned over the past 10 years... people dont read... myself included at times. But at least I can say that I make an effort to read. Might not be able to comprehend what I am reading well enough to implement things or attempt to implement and cause myself a few days of headache. But I did read.
I avoid customizations like the plague except as last resort. That is a guarantee for disaster in future upgrades. I avoid code that has some people's name attached except as last resort too. That, I have learned over the last 10 years also.
I do appreciate the time you have taken which has made me take the time to think things through a bit more thoroughly.
-
Re: Price Updater
Quote:
Originally Posted by
RixStix
The part that scares me is when I read portions of a current plugin is now part of core.... AND what happens to the portion of the plugin that is not core? For a user who might not read everything before they start. That's one thing I have learned over the past 10 years... people dont read... myself included at times. But at least I can say that I make an effort to read. Might not be able to comprehend what I am reading well enough to implement things or attempt to implement and cause myself a few days of headache. But I did read.
Two good points.
Again, think of the mod as having certain elements that may well have been moved into the core in 155 or especially 156. It may just be that new functionality in some other area of pricing eliminates the need for all of DPU to be ported over.
Reading!?! You think people need to read!?!. I like the ones that read the posting tips reminder juuuussssst enough to know to remove that portion before posting. No current version, no mods, no link, etc, etc, etc.:frusty:
Your site does very well on Accessibility. The only item that is not already fixed in 1.5.7's non-css area is the contrast of your site. It's also one of the reasons we're revamping the Color Change mod for 1.5.7. In your case, color-second is the problem (probably copied from our mod -- or so I read:P) The hex is too harsh if the browser doesn't use the rgba. Compatibility is driving us to lighter hex and more opaque rgba colors to keep from "blasting" folks out.
And, so many are finding that the opacity really go off the charts if two or more are on top of each other. A quick example is to go to your site and F12 or right-click to inspect. Navigate to the @navManWrapper and turn off both the hex and rgba. Watch your Categories header as you turn either one back on. Notice how it can be three different colors depending upon where the opacity is entered.
Anyway, enough of the hijacking. Keep those positive thoughts going and you won't be #0000FF:D
-
Re: Price Updater
zc 157
vanilla install
drop db tables
import 156c db tables from live site
clone responsive classic template
OPC plugin installed
DPU doesn't play nice. Product screens just flash and flash and flash
Is this an example of plugin not ready for primetime 157, an ID10t error on my part or something else?
https://srevaewniahc (A DOT GOES HERE) info/index.php?main_page=product_info&cPath=1_7&products_id=9
-
Re: Price Updater
Quote:
Originally Posted by
RixStix
zc 157
vanilla install
drop db tables
import 156c db tables from live site
clone responsive classic template
OPC plugin installed
DPU doesn't play nice. Product screens just flash and flash and flash
Is this an example of plugin not ready for primetime 157, an ID10t error on my part or something else?
https://srevaewniahc (A DOT GOES HERE) info/index.php?main_page=product_info&cPath=1_7&products_id=9
Darnit, somewhere in the forum I posted the fix for the issue other than referring to the latest branch for github.
Basically there was a need identified in ZC 1.5.7 to require that a main_page parameter always accompany a products_id parameter. Couple this with the fact that zen_get_all_get_params doesn't actually return *ALL* of the parameters in the $_GET array and yes, the page(s) load again and again because of the Ajax request going through the sanitizer and forcing a page reload... the change, presented here: https://github.com/mc12345678/Dynami...ter/tree/3.2.1
Though there is one additional feature currently off of that branch (discussed above) to properly respect the upgrade check flag at: https://github.com/mc12345678/Dynami...t_update_check
-
Re: Price Updater
Thanks for the reply. OK, so the zc plugin DPU is obsolete for anything other than what is listed.
I followed the links, both seem the same. I see references but I don't see a 'download all the correct files' button or a "download the complete plugin" button.
Can you help with a simple explanation of where I am missing the download button?
-
Re: Price Updater
Quote:
Originally Posted by
RixStix
Thanks for the reply. OK, so the zc plugin DPU is obsolete for anything other than what is listed.
I followed the links, both seem the same. I see references but I don't see a 'download all the correct files' button or a "download the complete plugin" button.
Can you help with a simple explanation of where I am missing the download button?
On my mobile I didn't see the "big button" either, but when I viewed the source code of the page, I found this link that will download at least the 3.2.1 branch as a zip:
https://github.com/mc12345678/Dynami...hive/3.2.1.zip
For the other branch, replace the above 3.2.1 with the branch name.
-
Re: Price Updater
Thank you. It's on tomorrow's todo list.
-
Re: Price Updater
Thank you. Works as expected, no flashes.
-
Re: Price Updater
zen 1.56c php 7.0
i have map pricing module installed (Shows price as - Priced so low Unable to show a price. add to cart to see price.) and this module. when this module is activated it shows the price. how can i not have it effect that module?
also have certain products price at a sq ft. but sold by the box. this module changes the sq ft. price to sold by the box price.
this module also takes away the text before the price and only shows the price.
-
Re: Price Updater
Quote:
Originally Posted by
jimmie
zen 1.56c php 7.0
i have map pricing module installed (Shows price as - Priced so low Unable to show a price. add to cart to see price.) and this module. when this module is activated it shows the price. how can i not have it effect that module?
also have certain products price at a sq ft. but sold by the box. this module changes the sq ft. price to sold by the box price.
this module also takes away the text before the price and only shows the price.
For MAP, will need to intercept output of this plugin so that it doesn't attempt to actually show what is in the cart for those product. There is I thought a section of code that somewhat covers this situation. Recommendation would be that the plugin be disabled for product that are tracked by MAP which is done at the beginning of the associated code set in the files added to includes/modules/pages/PRODUCT_TYPE/.
As far as the "sold by the box" versus square foot. This module works off of providing the cost and associated information based off of what the shopping cart itself reports. It is possible to intercept that information and alter it to what is needed for the various product, but whatever it is that makes the product's price display unique upon landing there, needs to be carried over to that processing so that the appropriate "type" of price is shown.
The shopping_cart class has notifiers that could potentially be used knowing that the current page is say the product_info page and/or that the source function/class is/was the DPU class or a function within it, etc... even perhaps one of the notifiers in the DPU class could be used to intercept the value(s) and do some sort of conversion based on information captured from earlier gathered information when the shopping_cart class ($_SESSION['cart']) was "triggered"/accessed.
-
Re: Price Updater
found this, added whats in red but didnt work. not sure what phrase i should put there.
Code:
if (defined('DPU_STATUS') && DPU_STATUS === 'true') {
$load = true; // if any of the PHP conditions fail this will be set to false and DPU won't be fired up
$pid = (!empty($_GET['products_id']) ? (int)$_GET['products_id'] : 0);
if (0 == $pid) {
$load = false;
} elseif (zen_get_products_price_is_call($pid) || zen_get_products_price_is_free($pid) || zen_get_products_map_enabled == 1 || STORE_STATUS > 0) {
$load = false;
}
$pidp = zen_get_products_display_price($pid);
if (empty($pidp)) {
$load = false;
}
and i only want the price to update if product has an attribute
-
Re: Price Updater
Quote:
Originally Posted by
jimmie
found this, added whats in red but didnt work. not sure what phrase i should put there.
Code:
if (defined('DPU_STATUS') && DPU_STATUS === 'true') {
$load = true; // if any of the PHP conditions fail this will be set to false and DPU won't be fired up
$pid = (!empty($_GET['products_id']) ? (int)$_GET['products_id'] : 0);
if (0 == $pid) {
$load = false;
} elseif (zen_get_products_price_is_call($pid) || zen_get_products_price_is_free($pid) || zen_get_products_map_enabled == 1 || STORE_STATUS > 0) {
$load = false;
}
$pidp = zen_get_products_display_price($pid);
if (empty($pidp)) {
$load = false;
}
and i only want the price to update if product has an attribute
Right place to add something, the question is if it is the right thing to add. I read || zen_get_products_map_enabled == 1to mean that there is something like a function that is named zen_get_products_map_enabled, though if so, I would add parentheses at the end of that to more accurately reflect that it is a function. Otherwise is that supposed to be a variable? If so it is missing a dollarsign at the beginning: $zen_get_products_map_enabled. Or is it a function that is supposed to take a parameter ($_GET['products_id']) so that it can respond to the question of if the "current" product is affected by map?
BTW, if all this seems "too much", let me know and can provide some more step-by-step searching ideas to better incorporate this concept.
As far as only updating when product has attributes, then when using the latest software, should note that updates also occur when the product's quantity box is available for edit (following ZC process to determine if the quantity box should be displayed or not). Will need to disable that additional determination which will affect display of price differences caused by quantity discounts and any other determination that is made/shown by way of current quantity in cart and effect of adding additional to the shopping cart as shown on the shopping_cart page.
-
Re: Price Updater
the field in database is labeled map_enabled, there are radio buttons on product edit page 0 = off 1 = on
-
Re: Price Updater
Quote:
Originally Posted by
jimmie
the field in database is labeled map_enabled, there are radio buttons on product edit page 0 = off 1 = on
If that field is partof the products table, then the following function could be used to lookup the value and take action:
Code:
zen_products_lookup($_GET['products_id'], 'map_enabled') == '1'
This function is built into ZC as compared to possibly using a function associated with MAP. If a function is included with MAP to potentially do a similar search, would recommend first validating that the function exists, followed by (anded) the check of the value.
-
Re: Dynamic Price Updater
Does the newest version of DPU work on html pages generated by the Ultimate Urls pluggin? I am currently running DPU 3.2.0 and Ultimate Urls 2.215 and the price displays correctly on .php pages but not on the html pages generated by Ultimate urls. Don't want to waste my time upgrading the Ultimate urls if it does not.
thanks,
John
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
GoldBuckle
Does the newest version of DPU work on html pages generated by the Ultimate Urls pluggin? I am currently running DPU 3.2.0 and Ultimate Urls 2.215 and the price displays correctly on .php pages but not on the html pages generated by Ultimate urls. Don't want to waste my time upgrading the Ultimate urls if it does not.
thanks,
John
I don't have an answer to that, I don't really know of anything that USU does that would/should have an effect on DPU. DPU doesn't check for information on the URI to worry if it is a ".php" versus ".html" page. I would expect that USU doesn't modify the internal $_GET variables in a way that removes existing information. There are other factors that may be at play causing an issue with display (eg. a script error from some other code could prevent DPU script code from firing). It is recommended to use the latest version(s) which include ZC (version not identified in above post).
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
GoldBuckle
Does the newest version of DPU work on html pages generated by the Ultimate Urls pluggin? I am currently running DPU 3.2.0 and Ultimate Urls 2.215 and the price displays correctly on .php pages but not on the html pages generated by Ultimate urls. Don't want to waste my time upgrading the Ultimate urls if it does not.
thanks,
John
Quote:
Originally Posted by
mc12345678
I don't have an answer to that, I don't really know of anything that USU does that would/should have an effect on DPU. DPU doesn't check for information on the URI to worry if it is a ".php" versus ".html" page. I would expect that USU doesn't modify the internal $_GET variables in a way that removes existing information. There are other factors that may be at play causing an issue with display (eg. a script error from some other code could prevent DPU script code from firing). It is recommended to use the latest version(s) which include ZC (version not identified in above post).
Although I haven't heard/seen others having issues with USU and DPU together, doesn't mean that there haven't been those that have had them. I saw your post in the USU forum which was far more detailed than the above. Got me thinking about the possibility that USU might be trying to rewrite othe uri for ajax.php just maybe. As a result some of the "return" code may not be executing and therefore the spinning graphics shows if enabled or if disabled the price doesn't update. (by disabled, I mean the spinning graphic.)
If able, think could PM me a page address of a problem product? Maybe could take a look at the page to see what is going on.
-
Re: Price Updater
added this
Code:
} elseif (zen_get_products_price_is_call($pid) || zen_get_products_price_is_free($pid) || STORE_STATUS > 0 || zen_products_lookup($_GET['products_id'], 'map_enabled') == '1' ) {
works fine.
thankyou
why the quotes around the 1? (i removed them)
sq ft price versus carton price, my customers want to see what they are paying per sq ft., but buy by the carton (Min, max Units) DPU Looks at this field and changes the price from sq ft to carton. how to stop this action, or only activate for attributes only.?
-
Re: Price Updater
Quote:
Originally Posted by
jimmie
added this
Code:
} elseif (zen_get_products_price_is_call($pid) || zen_get_products_price_is_free($pid) || STORE_STATUS > 0 || zen_products_lookup($_GET['products_id'], 'map_enabled') == '1' ) {
works fine.
thankyou
why the quotes around the 1? (i removed them)
sq ft price versus carton price, my customers want to see what they are paying per sq ft., but buy by the carton (Min, max Units) DPU Looks at this field and changes the price from sq ft to carton. how to stop this action, or only activate for attributes only.?
I used quotes because data retrieved from the database at least such as that is text when initially retrieved. To evaluate it as a number (integer in this case) it should be type cast to that type. By using a non-quoted value, php attempts to do a form of type casting. Ideally the function would have been prefaced with (int) and then also an exact match used (=== 1).
As far as evaluating to prevent DPU operation for anything that doesn't have attributes, could recommend the following:
Code:
!zen_has_product_attributes($pid)
To be included in the same "path" as the above so that when that is true (doesn't have attributes) that $load will be set to false.
-
Re: Dynamic Price Updater and bootstrap template
I am running a clean install of v 1.5.7 with demo product info and then the first thing I did was install DPU 3.2.0 and went to a test product page once I turned on DPU in the admin configuration and the page just keeps refreshing. Not sure where to start to fix it.
-
Re: Dynamic Price Updater and bootstrap template
Scroll up to post #1564 and that should help.
-
Re: Dynamic Price Updater and bootstrap template
Quote:
Originally Posted by
RixStix
Scroll up to post #1564 and that should help.
Direct link to that post is: https://www.zen-cart.com/showthread....58#post1370158
-
Re: Dynamic Price Updater and bootstrap template
zen version 1.56C php7.0
how can we make the model number change to customid on select,
also would like to add a sku or (custom fields) that change on select.
right now i have picture, price, stock and weight all changing on select. i need to have the model number change to custom id. and i want to use the description field to store barcodes and have them change on select. and have the description field incorporated to lookup of other barcodes
here is my site with example product
https://jnsflooringandsupplies.com/T...I_White_Mallet
jimmie
-
Re: Dynamic Price Updater and bootstrap template
also how can i get my text back that shows up b4 dpu activates. example is when customer not logged id they see Price $34.01 or if they are logged in they see Retail Price $34.01, if customer has wholesale account it says Your Price $30.29
-
Re: Dynamic Price Updater and bootstrap template
Quote:
Originally Posted by
jimmie
zen version 1.56C php7.0
how can we make the model number change to customid on select,
also would like to add a sku or (custom fields) that change on select.
right now i have picture, price, stock and weight all changing on select. i need to have the model number change to custom id. and i want to use the description field to store barcodes and have them change on select. and have the description field incorporated to lookup of other barcodes
here is my site with example product
https://jnsflooringandsupplies.com/T...I_White_Mallet
jimmie
This would primarily require some custom coding, but there are areas throughout the code to perform additional data retrieval from the database and to then populate the data array that is returned. This portion is in the DPU class. Then once returned, the javascript needs to know/understand where to place the associated data. Effectively anything that is to be updated/modified needs to have some sort of unique identifier such as an id tag or a specific name in a surrounding html tag. Such could be included in your product description and be "updated" on selection change. Basically though the extra information would follow the same process as any of the other originally provided items.
-
Re: Dynamic Price Updater and bootstrap template
Quote:
Originally Posted by
jimmie
also how can i get my text back that shows up b4 dpu activates. example is when customer not logged id they see Price $34.01 or if they are logged in they see Retail Price $34.01, if customer has wholesale account it says Your Price $30.29
The text to be displayed is assembled in the DPU class. Currently there is a different text constant depending on the status of selection. E.g. If a product has multiple selections available (2 or more option names) where each can affect the price and none have been selected the ZC standard text is provided, if one of the options is selected, but not all then a modified version of the text is displayed, if all selections have been made (that affect price) then something equivalent to "your price:" is displayed. This is meant to provide information to the customer associated with their selections. This also is built off the premise that one uses an option value as a default that is for display only...
If it is expected that different text is to be displayed for different customer status and/or inclusion to some group then that text could and should be modified appropriately. There are some notifiers in the DPU class to be able to use an observer to modify that portion of the text as desired and/or one could modify the code in the DPU class to determine the customer's "status" and use text appropriate to that, but I'd discourage slaughtering the code for that and use the notifier/observer method instead.
Note that as I recall there is one of the "wholesale" like plugins somewhat incorporated to retrieve/address pricing when doing early calculations. It too is in the DPU class when gathering the pricing data.
-
Re: Dynamic Price Updater and bootstrap template
zencart 1.5.6C
DPU version 4.0.0-beta.3
I have installed DPU on a copy of our live site and it works as expected with a product with a single drop down option
but i have products with 2 radio options (colour and size)
Colour has +0 price. size price varies eg small = 26.85, medium = 28.95 etc
there are 2 issuses
1) when the page loads the starting price is shown correctly, for a moment, then the little place holder takes over and then the price is shown as starting at £0.00.
this stays the same when a colour is selected (makes sense as colour has no effect on the price)
2) when the size is selected the placeholder returns and stays there
any one have any ideas where i should begin looking?
-
Re: Dynamic Price Updater and bootstrap template
Quote:
Originally Posted by
Daniel65
zencart 1.5.6C
DPU version 4.0.0-beta.3
I have installed DPU on a copy of our live site and it works as expected with a product with a single drop down option
but i have products with 2 radio options (colour and size)
Colour has +0 price. size price varies eg small = 26.85, medium = 28.95 etc
there are 2 issuses
1) when the page loads the starting price is shown correctly, for a moment, then the little place holder takes over and then the price is shown as starting at £0.00.
this stays the same when a colour is selected (makes sense as colour has no effect on the price)
2) when the size is selected the placeholder returns and stays there
any one have any ideas where i should begin looking?
Would initially look at the settings of the attributes within attributes controller, though also would identify whether the product is priced-by-attributes or not as set in the product's information page. For attributes, consider the settings for at least: Default and Base Price.
Umm, also in second look, where is this DPU version 4.00 beta 3 obtained from? (web address) That is not a version designation that I have used and generally speaking the above issue doesn't occur unless attributes options are incorrectly set...
-
Re: Dynamic Price Updater and bootstrap template
i googled zen cart dynamic price update and found this
https://github.com/Zen4All-nl/Zen-Ca...-Price-Updater is it not the right one?
-
Re: Dynamic Price Updater and bootstrap template
Ok the product is deffinately set to priced by attributes
Im not too sure what you meant by "For attributes, consider the settings for at least: Default and Base Price."
all the attributes in both colour and size are set to Display only X ,Free O, Default X, Discounted O ,Base Price O,Required X
(this where a screen shot would be handy if i could get one into the post)
I have tried turning the defaults on and off, setting all but one to either x or o,with and without setting free to x or o
I have also tried setting the priority of the options so that it did size first, with exactly the same result
-
Re: Dynamic Price Updater and bootstrap template
Quote:
Originally Posted by
Daniel65
I'm not going to say no because Design75 stepped away from the code for a period of time during which I made modifications that "presumably" are incorporated into that version which at last look appeared to be being rewritten to consider installation to the oldest of either ZC 1.5.6 or ZC 1.5.7 (I don't recall). Initial transfer appeared to incorporate the latest that I had worked on as found at: https://github.com/mc12345678/Dynami...ter/tree/3.2.1 (Though I would recommend also incorporating https://github.com/mc12345678/Dynami...98e98562f548cb)
Quote:
Originally Posted by
Daniel65
Ok the product is deffinately set to priced by attributes
Im not too sure what you meant by "For attributes, consider the settings for at least: Default and Base Price."
all the attributes in both colour and size are set to Display only X ,Free O, Default X, Discounted O ,Base Price O,Required X
(this where a screen shot would be handy if i could get one into the post)
I have tried turning the defaults on and off, setting all but one to either x or o,with and without setting free to x or o
I have also tried setting the priority of the options so that it did size first, with exactly the same result
Display only implies that the option should not be selected. Unfortunately I'm not sure I necessarily follow the meaning of X versus O. To me an X means that it is chosen and an O means that it is not. For a brief/quick explanation, default is intended to indicate that the attribute option will be marked for selection when the page is freshly loaded. There is a little bit of a caveat to that depending on the selection type. If it is a dropdown, then the last item marked for default is expected to be the active selection when the customer arrives at the product. If is a radio, then I believe the same is true (I've forgotten at the moment) of the last one or if made possible that all such radio buttons are selected, if it is a checkbox, then each item set as default is already selected for the customer.
If free is selected, then when the product is identified as being free (a priced-by-attributes product that has any attribute set to a non-zero price would not be considered free) then the attributes price is treated as free as well. The priority is a display situation not used to influence the "base" price. Discounted allows the discount applied to the product to also be applied to the attributes. Base Price supports identifying the lowest price of the product.
One thing identified by RixStix is that it is possible in some setups while using DPU that if a selection is not "pre-made" then the DPU response price is 0 until at least one selection is made. That said, I also just noticed that using 1.5.6c where the current released sub-version is 1.5.6f... There may be other issues in play as a result of not being up-to-date at least within the 1.5.6 series (1.5.7 has been issued as well).
All that said, for understanding, what happens with this plugin is basically, the page is displayed, the product is effectively added to the shopping cart with the "lowest priced" selections made, the price that results is returned for evaluation. At least in the work I did, there are multiple "conditions" evaluated. If no selections are made, then the customer is to basically be notified of what the smallest price expected would be, until all selections are made the customer is provided slightly different text intended to indicate that the final price hasn't been determined is provided, and once all selections have been made the "final" price of the product is displayed. Certainly the text variations can all be made the same if so desired, but I wanted to offer an opportunity to improve the customer experience in understanding their selections before attempting to add the selection(s) to the cart. I don't know if such is being carried over/on. I am sure that Design75 would appreciate more information about how to reproduce the issue so that it may be corrected, though also in looking at the github site I see that there is a development version that is being identified as 4.0.0 b4 I believe.
-
Re: Dynamic Price Updater and bootstrap template
@mc12345678: your pm message quota is full, preventing more being received.
Just to let you know I am working on this (with ZC158). I have used the Zen4All develop branch as a starting point.
What put me off previously was the two repositories for reporting issues, each with it's own branches...but since he has consolidated fixes between three sources I'm just going to report issues on Erik's and PR my changes to that one.
When I have finished my fettling for my purposes I'll let you know so you can check out unresolved issues that may have been fixed on the way.
This is a very complicated mod to test as it can/should handle so many eventualities.....
-
Re: Dynamic Price Updater and bootstrap template
Quote:
Originally Posted by
torvista
@mc12345678: your pm message quota is full, preventing more being received.
Just to let you know I am working on this (with ZC158). I have used the Zen4All develop branch as a starting point.
What put me off previously was the two repositories for reporting issues, each with it's own branches...but since he has consolidated fixes between three sources I'm just going to report issues on Erik's and PR my changes to that one.
When I have finished my fettling for my purposes I'll let you know so you can check out unresolved issues that may have been fixed on the way.
This is a very complicated mod to test as it can/should handle so many eventualities.....
Thanks for the heads up on all fronts.
-
Re: Dynamic Price Updater and bootstrap template
I'm looking at an issue to do with restricting its operation, and I must clarify for my own sanity that this should be processing the price only:
a) if a product has attributes that contain pricing data. So if all are zero, no need for DPU.
b) for any product on a cart quantity box change. So if no quantity box (or order quantity maximum is 1), no need for DPU.
Any other situations?
-
Re: Dynamic Price Updater
Any idea when the v4.0.0 will be out of beta?
-
Re: Dynamic Price Updater
Hello. I'm having an issue with a brand new ZC installation. ZC version is 1.5.7d and the latest of this module found in the plugin area.
DPU works fine, except on radio buttons. For some reason the wheel won't stop spinning.
I remember I had this or similar issue a few years back, and we had made changes to a few files.
The files we modified were the pages>product_info>jscript_dynamic_price_updater.php and the includes>classes>dynamic_price_updater.php.
This is the page where the issue appears https://www.byvalenti.com/ZCBASE/tin...ul-colors-p-33
Would you be able to help out?
Thank you!
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
mvstudio
Hello. I'm having an issue with a brand new ZC installation. ZC version is 1.5.7d and the latest of this module found in the plugin area.
DPU works fine, except on radio buttons. For some reason the wheel won't stop spinning.
I remember I had this or similar issue a few years back, and we had made changes to a few files.
The files we modified were the pages>product_info>jscript_dynamic_price_updater.php and the includes>classes>dynamic_price_updater.php.
This is the page where the issue appears
https://www.byvalenti.com/ZCBASE/tin...ul-colors-p-33
Would you be able to help out?
Thank you!
Unless someone else also responds before I get a chance to look into this, I will take a look but haven't personally experienced that issue (yet).
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
mc12345678
Unless someone else also responds before I get a chance to look into this, I will take a look but haven't personally experienced that issue (yet).
Thank you! I'm trying to see if the changes we made back then would work, but the files are substantially different and my php skills quite poor :blush:
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
mvstudio
Hello. I'm having an issue with a brand new ZC installation. ZC version is 1.5.7d and the latest of this module found in the plugin area.
DPU works fine, except on radio buttons. For some reason the wheel won't stop spinning.
I remember I had this or similar issue a few years back, and we had made changes to a few files.
The files we modified were the pages>product_info>jscript_dynamic_price_updater.php and the includes>classes>dynamic_price_updater.php.
This is the page where the issue appears
https://www.byvalenti.com/ZCBASE/tin...ul-colors-p-33
Would you be able to help out?
Thank you!
Quote:
Originally Posted by
mc12345678
Unless someone else also responds before I get a chance to look into this, I will take a look but haven't personally experienced that issue (yet).
I've looked over this to the extent that I can with the hardware immediately available. I see that the software being used is from the Beta 4.0.0 path.
I haven't gone back to review/validate this version so hopefully someone more familiar can further assist.
When I get to where I can follow the script, I might be able to identify something further about why the code stops at the initial display of the "thinking" area. There are though sufficient differences in the includes/modules/pages/product_info/jscript_dynamic_price_updater.php file to possibly cause this issue.
Ideally would suggest identifying this as an issue at the location from which the software was downloaded and then posting back here when and how it was resolved.
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
mvstudio
Thank you! I'm trying to see if the changes we made back then would work, but the files are substantially different and my php skills quite poor :blush:
This is more than likely a jQuery related issue which is a different set of skills than php. :) If can identify what those changes were, perhaps they could be identified as helpful or otherwise further corrected.