Re: Dynamic Price Updater
This was something brought up as an issue over the weekend in the github repository.
The upfront way to disable it for no attributes affecting price and not displaying the quantity box would be to assess all of the attributes to determine if they have an affect on price, if they do not then to disable the javascript in its entirety for the product. This is supposed to be accomplished by the functions_lookups.php function of zen_has_product_attributes_values($products_id); however, has a potential flaw in the pre-ZC 1.5.6 version of the file in that if the sum of options_values_price is 0 (say made of 3 values such as -1, 0, and 1), then it would appear that none of the attributes of the product have an effect on the price. Unfortunately the function also does not evaluate the presence of text field pricing changes (so could report false when the text fields have an effect on pricing). So, there are two ways being considered to implement that code. One is to directly use the code that has been incorporated into ZC 1.5.6 to correct this issue, the other is to just use the function and as seen fit to update the internal code of the function. Regardless it may be best for stable operation to build functions within the DPU class to test for these conditions.
For individual attributes, where a product has more than one attribute, I'm thinking that in the attributes build, to include a html to support skipping the updating or as part of the above review, to build a data set that would prevent adding the applicable "change" action to the applicable field. Thing is that the current operation pretty much is indiscriminate about what the field is and looks mostly at what type of field it is. Adding additional "checks" against it necessitates additional consistency in the template, regardless the designer.
Otherwise disabling the "image" replacement/presentation (setting show a small loading graphic set to false) would reduce flicker and just change the price where/when appropriate.
I'm working on implementing the above to become more detailed; however, want to be mindful of maintaining flexibility of integration.
Re: Dynamic Price Updater
Thanks for taking a look.
Re: Dynamic Price Updater
Zen version 1.5.5f
I was using a different template and got dynamic price updater working great! Then I switched to a new template and no love. I've tried uninstalling and reinstalling.
Can you put eyes on it and see if there's somehing obvious I'm missing? http://odd-bodkin.com/chemise/sylvia/broadcloth
Re: Dynamic Price Updater
Quote:
Originally Posted by
devlyn
Zen version 1.5.5f
I was using a different template and got dynamic price updater working great! Then I switched to a new template and no love. I've tried uninstalling and reinstalling.
Can you put eyes on it and see if there's somehing obvious I'm missing?
http://odd-bodkin.com/chemise/sylvia/broadcloth
Javascript===html validation...
What I mean by that (abnormal) representation is that for things to "auto-update" there is some form of javascript involved. When javascript (jquery or the like) is involved, the page's html really should validate. Ie. For every open tag there should be an equivalent close tag located in the correct sequence: <tag1><tag2></tag2></tag1>. There are other "criteria" as well.
Anyways, this page ends up showing several errors that could affect the ability of javascript to execute as found here: https://validator.w3.org/nu/?doc=http%3A%2F%2Fodd-bodkin.com%2Fchemise%2Fsylvia%2Fbroadcloth. Worrisome is that there is some php code that gets pushed to the browser, but that's something else apparently.
Another potential issue after that is resolved could be from other javascript overriding the operations already "attached", but I didn't see that per se in the html code. I didn't have a chance to try on a desktop where I could follow the script execution better.
Re: Dynamic Price Updater
Quote:
Originally Posted by
dbltoe
ZC 1.5.5f PHP 7.1
https://allpecans.com/index.php?main...roducts_id=138
I've read thru this thread a couple of times trying to figure out how to get this updater to not fire on products that are not priced by attribute. Or, to get it to not fire on individual attributes.
It's an excellent concept, but at the very least annoying to have the price "bouncing around" as you make changes/selections that have no change whatsoever to the price. At its scariest point, I wonder if it violates 508 accessibility in the possible blink rate when adding text. Certain colors blinking at specific rates can result in seizures. I agree that this is stretching things a bit, but having seen a flashing screen cause a seizure makes me understand why 508 specifies no blinking at certain rates.
https://webaim.org/articles/seizure
In the link above, it's possible that an unaware typist could set off an improper flicker by typing a Gift Message. Again, I agree that this is worst case scenario. I think that most would agree that it is at least distracting.
In earlier portions of the thread, it was intimated that there were ways of turning off the properties of DPU. Some threads mentioned removing the plus sign. I have not been successful in finding any way to turn this off individually.
Best case in the above example would be to not fire DPU at all as the item is not priced by attributes. However, even an item priced by attributes might need to turn off one attribute. The Gift Message at
https://allpecans.com/index.php?main...roducts_id=115 being an example.
Not having the expertise to mess with jscript_dynamin_price_updater.php, I'm hoping some of you have suggestions.
THANX
Quote:
Originally Posted by
dbltoe
Thanks for taking a look.
Completely written without testing (yet), but I wouldn't mind a little feedback/indication of complete failure.
The changes are basically shown in the following comparison: https://github.com/mc12345678/Dynami...-reduce-events
I wrote it based on expected and partially observed operations, I plan on applying it to a live like system to see if can eliminate the flickering for option names that do not affect price and to continue to work out other bugs (that might exist).
Re: Dynamic Price Updater
Quote:
Originally Posted by
mc12345678
Completely written without testing (yet), but I wouldn't mind a little feedback/indication of complete failure.
The changes are basically shown in the following comparison:
https://github.com/mc12345678/Dynami...-reduce-events
I wrote it based on expected and partially observed operations, I plan on applying it to a live like system to see if can eliminate the flickering for option names that do not affect price and to continue to work out other bugs (that might exist).
Just did a quick look at the source code of a page that has a text box and already see that those concerned with a text box will be happy because even if everything else is right, the text box won't get identified to update the price(s). Will need to double check the file type option as well... I had already accounted for differences in radio and checkboxes, but missed the unique info for text boxes... darnit.
The above link will still be good when that is corrected though.
Re: Dynamic Price Updater
Quote:
Originally Posted by
mc12345678
Just did a quick look at the source code of a page that has a text box and already see that those concerned with a text box will be happy because even if everything else is right, the text box won't get identified to update the price(s). Will need to double check the file type option as well... I had already accounted for differences in radio and checkboxes, but missed the unique info for text boxes... darnit.
The above link will still be good when that is corrected though.
Okay, have corrected the blatant typo errors (forgetting to type or just plain missing a $ before a variable, one time typing the wrong variable name (attributes_... instead of attribute_...) and copying that variable repeatedly, missing/forgetting a closing parentheses, etc...) and some logic related items. I've tested the code against each of the types of attributes supported by the base install of ZC with regards to whether to "flash" or not...
As to the occurrence when typing text in a text box that could adjust price, would still need to see about applying some sort of "lag" to the update process... If typing quickly the text remains with the timeout option, but if type one key at a time with a little bit of a pause, it is possible that "flashing" could occur...
Don't know if perhaps should consider not replacing the text with an image if the field being updated is a text field, or even possibly changing/removing the events... Ie. currently the event is 'input', but perhaps could be something that occurs at a more "individual" time period such as lose focus or be more dependent on the type of update.
For example a text field that is only based on the number of words should really only update when a word has been started and not again until a new word is started (or is removed). Whereas a character only version would be updated on a per character basis.
That said, I haven't incorporated anything specific to "free" characters/words... So even if there are such free objects, the price text will try to update.
I will shortly be merging these changes into the upcoming version 3.2.1 branch and likely will squash several of the commits so that the errors included throughout today's development will be less "open" for the final distribution.
Re: Dynamic Price Updater
Im still having problems with DPU as per post:
https://www.zen-cart.com/showthread....22#post1344422
I'm also having issues with after adding product to the cart, the continue shopping button link is incorrect and shows - /?act=DPU_Ajax&method=dpu_update
So when clicking on continue shopping it takes me to a 404.
Re: Dynamic Price Updater
Quote:
Originally Posted by
Calljj
Im still having problems with DPU as per post:
https://www.zen-cart.com/showthread....22#post1344422
I'm also having issues with after adding product to the cart, the continue shopping button link is incorrect and shows - /?act=DPU_Ajax&method=dpu_update
So when clicking on continue shopping it takes me to a 404.
First report of the continue shopping button acting that way, will look into what is causing that and address it. That said, regarding the price displaying as reported at the referenced post, what version of DPU is installed? Has the fix that was suggested related to webchills post been applied either as he provided it or as it was applied to the most recent modifications to the github version of the software?
Re: Dynamic Price Updater
Quote:
Originally Posted by
Calljj
Im still having problems with DPU as per post:
https://www.zen-cart.com/showthread....22#post1344422
I'm also having issues with after adding product to the cart, the continue shopping button link is incorrect and shows - /?act=DPU_Ajax&method=dpu_update
So when clicking on continue shopping it takes me to a 404.
Quote:
Originally Posted by
mc12345678
First report of the continue shopping button acting that way, will look into what is causing that and address it. That said, regarding the price displaying as reported at the referenced post, what version of DPU is installed? Has the fix that was suggested related to webchills post been applied either as he provided it or as it was applied to the most recent modifications to the github version of the software?
Just tried using the latest version as provided on github. Had store set to not display the cart after adding product to the cart and switched to showing the cart after adding product. In both cases was not able to reproduce the issue with continuing with shopping.
Further please identify what other plugins may be installed and the "path" taken to get to the shopping cart where the continue shopping button is providing a return to address comprised of having the ajax command on the uri.