Zen Follower
- Join Date:
- Mar 2009
- Location:
- Essex, UK
- Posts:
- 448
- Plugin Contributions:
- 0
Dynamic Price Updater
Ok Thanks Erik. I do appreciate any help. :smile:
Views: 342,336
Zen Follower
Ok Thanks Erik. I do appreciate any help. :smile:
Zen Follower
Hi Erik
Sorry to be a PITA. Have you had any breakthroughs? :smile:
New Zenner
Having a bit of an issue. I had this working just fine in V1.5.1 and have since updated to 1.5.4. The template used (Abbington_Mega) is the same as when I was using 1.5.1. For some reason, the sidebox just displays the spinning loader image and the main price display does not update. I have it showing up in the admin window to make changes to the settings, however, I am not sure what settings if any are needed. In V1.5.1, the main price listing would change when an attribute was selected which added to the price, but now, nothing seems to happen. I did run the dataase through the upgrade process from 1.5.1 to 1.5.4, so I am not sure if that caused any issues. Thanks in advance for the guidance!
New Zenner
Quick Edit, I discovered that this mod works with the default classic template, but for some reason the Abbington_Mega template is not allowing it to work. I will check with the creator of that template and see what input they have.
New Zenner
I have checked with the creator of the template and they said that any verified plugin should work if properly merged. What I am not understanding is: since there are no files modified and the updater is simply dropped into the respective folders, what could be wrong with it not updating properly with this template. I reverified that all the files are in their proper folders as well as double checked it working just fine with the classic template on my server. More than a bit frustrating since the creator of the abbington_mega template seems like they are placing responsibility on your plugin rather than a possible conflict of some sort.
Totally Zenned
The only reason I can think of why it should not work, is that you didn't copy all the file to your abbington_mega template folders. I have this module running on multiple zen carts, without a problem.
Please recheck your files.
Totally Zenned
I've had this module working for a long time. I just noticed it was now not working.
In the console this error is shown:
"XML or text declaration not at start of entity" which is caused by anything being output before the <?xml version="1.0" encoding="utf-8"?> at the start of the file.
I find in the file that there is one whitespace character before the <?xml...
If your call this file directly:
http://YOURSHOP/dpu_ajax.php
you will/will not see this error flagged up in FFox,Chrome, Opera but not IE.
Removing the XML declaration entirely from the includes/classes/dynamic_price_updater.php allows the updater to work again but I would like to know why this has suddenly become an issue and how to fix it properly.
function dumpOutput() {
// output the header for XML
header('Content-Type: text/xml');// set the XML file DOCTYPE
echo '<?xml version="1.0" encoding="utf-8"?>'."\n";
// set the responseType
to
function dumpOutput() {
// output the header for XML
header('Content-Type: text/xml');// set the XML file DOCTYPE
// set the responseType
Totally Zenned
If the DPU admin option for a second price display is left blank/not used, it causes this javascript error.
This is due to the code check:
if (_secondPrice !== false) updSP();
which will be true if the field is empty and so will try to find the element that has no name set.
I changed it to this to stop the error:
if (_secondPrice !== '') updSP();
New Zenner
Hi, the plugin is working great. I was just wondering if it's possible to set a dropdown box to change the price of the product depending on which item is selected in a radio button? So that if the user selects the first option in the radio and an amount of 3 in the dropdown box the price will increase by x amount, but if the user chooses the second option in the radio and an amount of 3 in the dropdown the price will increase by z amount. And so on.
New Zenner
A colleague has found a bug with the plugin. When you go to the checkout, then click on the item in the shopping cart, it goes back to the page for the product, however the price is listed as the 'starting at' price, even though there are attributes still selected.
Totally Zenned
tdrsam:
A colleague has found a bug with the plugin. When you go to the checkout, then click on the item in the shopping cart, it goes back to the page for the product, however the price is listed as the 'starting at' price, even though there are attributes still selected.
I will take a look later this day, and see if I can reproduce the error.
Totally Zenned
Design75:
I will take a look later this day, and see if I can reproduce the error.
Okay, I get the same result... Now for the solution. Right now I am lacking the time to work on this, but it is on my to do list.
Zen Follower
Hi Design75
Going all the way back to my post https://www.zen-cart.com/showthread.php?70577-Dynamic-Price-Updater&p=1279633#post1279633 the conflict error has reared its head again.
It wasn't a problem before, but now Google have discredited our main product due to this issue, it now is a problem.
Please could you help/advise?
Many many thanks,
Zen Follower
I have two screenshots of both the error and the offending line (attached)
Althought these aren't as clear on the image the error message in Google Chrome > Developer Tools is :
firstGroup optionID: 3
Uncaught NotFoundError: Failed to
execute 'removeChild' on 'Node': The node to be removed
is not a child of this node.
And the offending code is (bold and in red)
temp = temp.substr(0, temp.length - 1)
this.getData('post', 'handlePrice()', temp);
}
objXHR.prototype.handlePrice = function () {
var thePrice = document.getElementById('productPrices');
[B]thePrice.removeChild(loadImg);[/B]
// use the spans to see if there is a discount occuring up in this here house
var test = thePrice.getElementsByTagName('span');
var psp = false;
Zen Follower
This module works great! Thank you for contributing it, it's really awesome, and I wish zencart came with this functionality already. The only thing is I can't get it to work with my add-this buttons. When turned on, my add this buttons won't show. I am guessing this is obviously a javascript problem, so I am figuring I need to edit these two files included with the module:
includes/modules/pages/product_info/jscript_dynamic_price_updater.php
includes/modules/pages/product_music_info/jscript_dynamic_price_updater.php
Not sure what to do though.
Zen Follower
Hello,
works great on my client side (even if I'm using an old version on 1.5.4 upgrade planned).
I was wondering, would it be difficult to make it run on the admin side, inside Edit Orders ?
I'm using Edit orders and when I'm changing an order, of course nothing changes.
Thanks for your help
Regards
Hubert
Totally Zenned
hubert:
Hello,
works great on my client side (even if I'm using an old version on 1.5.4 upgrade planned).
I was wondering, would it be difficult to make it run on the admin side, inside Edit Orders ?I'm using Edit orders and when I'm changing an order, of course nothing changes.
Thanks for your help
Regards
Hubert
To be honest, I have no idea. This would require a complete rewrite of the code.
Totally Zenned
Nice mod question has anyone got it to work on the product_listing.php page? It works fine on the info page but I use a module that shows attributes on the product listing page and need this to work on it as well.
Totally Zenned
This is the other module I'm trying to get it to work with:
https://www.zen-cart.com/downloads.php?do=file&id=1637
Totally Zenned
marcopolo:
This is the other module I'm trying to get it to work with:
https://www.zen-cart.com/downloads.php?do=file&id=1637
For DPU to work on the product listing you would have to rewrite the whole DPU mod
Fields marked required must be completed.
Tell staff why this post should be reviewed.