ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Well, I was wondering if there were javascript errors that were causing it not to function properly. Does DPU still function properly if the user manually updates the quantity field while your script is installed? Also is what has been provided for code all that is added to support the additional functionality?
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Ok, so went and reproduced the code/situation. While there may still be a better way to implement this, what I did that worked was to instead modify the javascript code like so:
Code:$(document).ready(function() { var chkqty = $('#addqty').val(); $("#button-minus").click(function(){ var addqty = $('#addqty').val(); if(parseInt(addqty)>1) { var newval = parseInt(addqty) - 1; $('#addqty').val(newval); try { init(); } catch (call_err) { console.log(call_err.stack); } return true; }else{ return false; } }); $('#button-plus').click(function(){ var addqty = $('#addqty').val(); var newval = parseInt(addqty) + 1; $('#addqty').val(newval); try { init(); } catch (call_err) { console.log(call_err.stack); } return true; }); });
This worked for me and would update after every increase/decrease made by clicking the + or -.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
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
Last edited by dbltoe; 6 Aug 2018 at 12:41 PM. Reason: links
A little help with colors.
myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.