-
Re: Dynamic Price Updater
Hey Chrome ~
I ran in to a problem on a product, and figured you might have seen this before.
If you go to:
http://www.wholesale4realtors.com/cart/index.php?main_page=product_info&cPath=100_103&products_id=231
...and change the quantity to 5,000
The price updater is merging the price and quantity for some reason, resulting in Your price: $249.95lbs. The attribute should result in $1999 and 100lbs.
Any thoughts? Could it be due to the weight being 3 #'s?
-
Re: Dynamic Price Updater
Hi
I notice there that you're using V1 of the Updater... V2 shouldn't be subject to this type of error (the Updater on your site is getting confused when reading the option values)
Upgrading isn't difficult... Just rename the original updater to have an underscore (or any other filesystem-friendly symbol) in front of its name then upload the new package
There are a few more settings in V2 but if anything goes wrong just let me know here :smile:
Incidentally, if anyone out there reckons they could help me out by prepping a readme file it'd be much appreciated :smile:
Cheers
Dan
-
Re: Dynamic Price Updater
if we could get a automated price with the specials showing as well without doing ajeh's trick. that would be nice. just a suggestion. also if the price of product a cost more then product b, getting rid of the higher price (product a) in the shopping cart so customers dont get confused.
-
Re: Dynamic Price Updater
Hi nyzcaddict
The specials display is something I'm working on and, while I have ideas, it's still in theory form :smile:
Could you elaborate on the second suggestion? I'm not sure I understand you fully
Cheers
Dan
-
Re: Dynamic Price Updater
Hey Chrome,
I uninstalled the old version of DPU and installed the new Version 2 and I cannot get it to work. Any suggestions?
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
perkiekat
Hey Chrome,
I uninstalled the old version of DPU and installed the new Version 2 and I cannot get it to work. Any suggestions?
I finally figured out why it was not working...for some reason the attribute I had selected would not allow the price to change...I created a new name for the attribute and now it works...don't have a clue why this happened but I am sure it has nothing to do with the updated DPU. It's more like human error on my part! :blush:
-
Re: Dynamic Price Updater
Hi.
What a great mod this is!. I do have one question however. I am sure it has come up before, but I cannot seem to locate it.
I would like to use the price updater on selected product pages only. Not globally. Is there any way to do this.
Thanks for your help.
-
Re: Dynamic Price Updater
Hi Chrome,
Thanks for the info I used v2 and it works. However, not for some time until I realized that I was running slimbox which when enabled caused a conflict.
It is now disabled slimbox and the dpu is working but I need a lightbox for the site. I have read through about 20 pages on the thread/ ball of wool and saw mention that there was a conflict with slimbox for v2 but I didn’t find a solution. Is there one?? Or can you recommend a lightbox addon that works with dpu?
Apoligies if I had missed the resolutions.
Thanks
Chingy
-
Re: Dynamic Price Updater
Hey Dan,
so for example if you have lotion
50ML cost 10 dollars
100ML cost 20 dollars.
if you add the 100ML to the cart and view your shopping cart, it will display $20 with $10 crossed out. kind of like the opposite of a product with a specials price (crossed out higher price and display lower price).
also if you could get the image swap on attribute to work with your mod, that would be neat.
:cheers:
-
Re: Dynamic Price Updater
Hi all
Sorry for not replying sooner... The RC licence on my W7 install ran out and I discovered that prevarication hasn't helped... For some odd reason I haven't recieved any thread updates... Right, down to business:
zandra: Thanks! :smile: This is a tricky one... It essentially means keeping a blacklist or whitelist of pages... I haven't yet decided on the best implentation but, unfortunately, there are higher priorities... If, however, this is something you really need please PM me
The Slimbox and image swap modules are failing because of the Updater (rather than the other way 'round) I believe... Please bear with me while I try to find what it is I've naulsed up :smile:
nycaddict: Sorry, the Updater doesn't affect the cart... It creates its own... For it to work as you'd like it'd have to be included in a page it currently isn't... I don't know if there is a more suitable module for expansion (I know there are things like Ajax cart mods) but I would suggest checking it out... Of course if you prefer you could PM me and we can discuss a custom solution :smile:
The next update will also incorporate logic to minimise page load times
Hopefully I'll have an update soon
Dan
-
Re: Dynamic Price Updater
PS Happy Saint David's Day (I just remembered)... D'win twp
-
Re: Dynamic Price Updater
don't know if this has been addressed before, but my attributes appear for a split second and and then disappear completely from the page. error logging reports:
[01-Mar-2010 16:36:49] PHP Warning: reset() [<a href='function.reset'>function.reset</a>]: Passed variable is not an array or object in includes/classes/dynamic_price_updater.php on line 194
[01-Mar-2010 16:36:49] PHP Warning: Variable passed to each() is not an array or object in includes/classes/dynamic_price_updater.php on line 195
[01-Mar-2010 16:36:49] PHP Warning: reset() [<a href='function.reset'>function.reset</a>]: Passed variable is not an array or object in includes/classes/dynamic_price_updater.php on line 194
[01-Mar-2010 16:36:49] PHP Warning: Variable passed to each() is not an array or object in includes/classes/dynamic_price_updater.php on line 195
???
-
Re: Dynamic Price Updater
HI Chrome! I tried to install this mod and it gave me an error and the icon would just keep loading when trying to update the price...
I do have the Ajax checkout module installed that was done by Numinix...could that be the cause of it not working?
The site is http://outdoorcookingdepot.com
I have uninstalled this mod for now - I am no ajax guru so have no idea where to look...
Thanks so much!
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
Chrome
Hi
I notice there that you're using V1 of the Updater... V2 shouldn't be subject to this type of error (the Updater on your site is getting confused when reading the option values)
Upgrading isn't difficult... Just rename the original updater to have an underscore (or any other filesystem-friendly symbol) in front of its name then upload the new package
There are a few more settings in V2 but if anything goes wrong just let me know here :smile:
Incidentally, if anyone out there reckons they could help me out by prepping a readme file it'd be much appreciated :smile:
Cheers
Dan
Hey Dan ~ I haven't had a chance to check back until now, and the update worked perfectly, so thanks for the quick reply.
I had asked months back about the weight portion being added, and I'm happy you got that in place. I'll see what I can do now to integrating the shipping module to offer a dynamic shipping estimate. The idea is if the buyer is signed in, it'll use their shipping zip code, and if not it'll use a zip code of designated by the developer, but includes a disclaimer that the shipping is an estimate and not yet based on the user's zip code.
My schedule is a bit hectic, so I'm not sure when I might get to this, but it's on my list.
-
Re: Dynamic Price Updater
I may as well add, I'm not a developer by any means, so if someone else might be more experienced and can integrate the shipping portion faster then me, by all means, take the lead. :blush:
-
Re: Dynamic Price Updater
Hi all
In order of posting:
gsdcypher: Can you send me a link to your site? That line in the class file basically looks through the cart product (as created by the Updater) reading the attributes... Interesting error... I'll hopefully be able to see something from the link
jill: After having a look at your site I notice you have a SEFU mod installed... This is a causing a 404 error to be sent back to the script which means the Updater thinks the class file couldn't be found even though usually there is a valid XML response... 2 options here and the first one is to see if your SEFU mod will allow certain URLs to be excluded... If it does tell it to exclude /dpu_ajax.php
The second option is a little more involved and requires you to edit the Javascript file... To do this open includes/modules/pages/product_info/jscript_ajax_updater.php and make sure you have wordwrap turned off... Next you will have to comment out lines 99, 103, 104 and 105... For example you would alter line 99 to look like this:
Code:
// if (_this.XHR.status == 200) {
The // is the symbol for a comment... Simply add it in front of the aforementioned lines... If that doesn't work please let me know :smile:
I'm glad V2 works for you ByOriginalDesign... Unfortunately, my schedule is really hectic too currently so I'm afraid I can't give attention to specific tasks... My next mission is to find out why the Ajax object isn't playing nicely with other mods
If I can get this figured out and have some time I'll have a look at what you need if you still require it
Cheers!
Dan
-
Re: Dynamic Price Updater
Hello Chrome,
I like your DPU v2 very much. There's only one topic I can't manage.
My standard currency is in EURO with 19% value-added tax.
I need the tax in the shop.
The problem is the value-added tax, so the gross price.
When i take a net price there is no difference between the
DPU-shown price and the price in the cart.
But the time i take a gross price, the Price difference
between the DPU-shown price and the Cart-Price
is always 2 Percent.
In detail the DPU-shown price is always 2 percent higher...
Have you got any idea which can be the reason.
I would be grateful if you had an idea.
Flo
p.s.:
tested both with zc 1.37 and 1.38
-
Re: Dynamic Price Updater
Hi
I think this issue may have come up once before while I was unwell and had no chance to really act upon it... I honestly have no idea why this should happen
Would you care to PM a link to a failing page to me? I may be able to glean some information
Cheers!
Dan
-
Re: Dynamic Price Updater
Hi Chrome, Great Mod but unfortunately we can't use it due to a bug in V2.
I believe this issue was mentioned earlier in this thread but I couldn't find a solution... when our products load they load with the discount assigned to them and the lower price included. As soon as we go to attributes it removes the discount and bases all prcies from the full price only. As most of our products are discounted it's proving to be unusable.
Is there any fix for this atall?
Thanks, Dave
-
Re: Dynamic Price Updater
Hi all
Sorry for taking so long to respond but my workload at the minute is very high
Unfortunately I haven't had any chance to work on the Updater at all recently... I acknowledge that there are a couple of issues that need resolving but I have to ask for your patience while I try to find some time to address them... For these issues there is no quick fix I'm afraid (I don't entirely understand them yet myself)
Thank you all for your patience and I'll try to get to the problems as soon as I can
Dan
-
Re: Dynamic Price Updater
Hi Dan,
thank you for your answers and time you have to spend.
Take care
Flo
-
Re: Dynamic Price Updater
I like this add on, but I have a small issue I can't seem to work out. I sell printing and want to set up my products with attribute pricing so my customers can calculate a price for any quantity instantly.
The way I have to price my products I need to us an attribute with a price per copy (ex. $0.01 for #20 white bond) and also use a one time charge (ex. $20.00) for setup costs of the print run. I put a test product on my site but it only shows the price per copy for Your Price: and doesn't add in the one time charge. It shows the total correctly in the shopping cart just not on the Your Price amount on the product page.
http://discountprintingservice.com/i...ducts_id=19812
Can your add on be configured so it will show the total price???
Thanks,
GoldBuckle
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
Chrome
Hi
I don't know if this module will be of any use to anyone but I've been asked to include it a couple of times so thought I'd release it into the wild to see if anyone can make use of it... Here's what it does:
When you have a product with attributes that alter the price this module will update the price displayed on the page instantly... This gives customers an at-a-glance price total as opposed to having to work it out themselves
The updater should (in theory) work with any amount of attributes
There is a readme included in the ZIP but installation is literally to just upload the file... It overwrites nothing, has no database hooks and is completely autonomous... if it breaks just delete the file
Currently it only works with attributes that are SELECTs... If it works for people I will update it to handle the radio boxes and checkboxes
The file can be found at
http://chrome.me.uk/PriceUpdater.zip
A working version can be seen at
http://www.studio5.uk.com/index.php?...&products_id=3
Let me know if it does/doesn't work or if anyone wants anything added or changed
Dan
:clap:I think it is nice!
-
Re: Dynamic Price Updater
Thanks for the reply jstnice, but my question still isn't answered. In your attribute setting you have boxes to enter pricing per attribute:
Prices & Weights
Price---------Weight--------Order----------One Time
+.02-------------0-------------1---------------$25.00
When I test it it is only calculating the Price (+.02) and is not adding in the one time charge of $25.00. It does however add up in the shopping cart, it just doesn't show up on the product page for Your Price
For example, (base on the above example) if someone orders 1000 flyers it should multiply 1000 by the Price of +.02 (which would be $20.00) then add the one time charge of $25.00 for a total of $45.00.
On my test product it is only multiplying the price +0.02 by 1000 and displaying that number without adding in the one time charge of $25.00.
Can anyone tell me how to fix this???
:frusty:
-
Re: Dynamic Price Updater
Anyone got any ideas on this one???
-
Re: Dynamic Price Updater
Hi
Can anyone shed any light on this query!!
I have the Dynamic Price Updater installed on my website and:
I have been adding extra prices to certain attributes of my products recently and have now noticed the sum of the attributes (at product level) are different to the data that is inputted into Zen.
However, when you add the product to cart, the price reverts back to the correct price! You can also briefly see the correct price if you refresh the page at product level, but it will then change, and settle incorrectly.
I have gone through numerous settings on zen to track down where the error is coming from and it seems that the problem occurs when I change the individual products' 'Tax Class' from 'none' to 'Taxable Goods'. (which I have set at 17.5%)
If you have the time to take a quick look at the site:
http://www.prestigeringcompany.com/i...roducts_id=377
and suggest any solutions to this I would be most grateful.
I hope that makes sense.
cheers
Darrel
-
Re: Dynamic Price Updater
Sorry, to add:
I am currently using version 1.3.8
The price on the product page is always higher (1%) than it should be. If you refresh the page, you can see the CORRECT price very briefly and then it settles INCORRECTLY.
However, when you add the product to cart, the price reverts back to the CORRECT price that has been set for that particular product!!
I have viewed the 'pricing round up' thread issues, and it doesn't seem to be this as it is only the Dynamic Price Updater that gets the incorrect total.
Any suggestions would be very appreciated.
Thanks
Darrel
-
Re: Dynamic Price Updater
In my store I have a large amount of products that have no attributes, and when I use the DPUv2 the products that I have specials and no attributes get updated with the Special Price and when the product is Sold Out it shows as "Your Price: 0.00". The product that I'm testing has 3 attributes. The first one is "Add Canopy" and it is a check that adds $91.00. The second one is the finish options with radio buttons. They don't add any amount to the price, and the last attribute is purely a test called Other Option with a "Just Add Me" value and adds the amount of $35.00 to the price. Well, in that order, the canopy Updates the price with the $91.00, but the Just Add Me does not Update the price with its $35.00. If I shuffle the order of the attributes to Add Canopy (first), Just Add Me (second), and the Finish at the end, then it works and both Attributes get to Update the Price.
Using the original DPU, there are no problems with the rest of the products that don't have attributes. The test product with the attributes works exactly the same way that it does with DPUv2 but in IE it shows the Done (with errors) symbol on the lower left corner of the browser and when double clicking the error we get:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Fri, 14 May 2010 13:13:58 UTC
Message: Object required
Line: 158
Char: 4
Code: 0
URI: http://f i s h p e t l o v e.com/index.php?main_page=product_info&cPath=11&products_id=14580
Message: Object required
Line: 158
Char: 4
Code: 0
URI: http://f i s h p e t l o v e.com/index.php?main_page=product_info&cPath=11&products_id=14580
The error only shows in some IE in some computers, I have seen the IE in two different setups in different locations. I talk with my hosting and they had the same version of IE I have (version: 8.0.6001.18702 running Windows XP) and they didn't see the error. Firefox does not show the error. I setted up IE to not show errors, and it is still showing.:cry::frusty::Flush:
My jscript_updater.php looks like:
Code:
<?php
// Small module to dynamically update main price when the product has price altering attributes
// (c) D Parry (Chrome) 2007 ([email protected])
// This module is free to distribute and use as long as the above copyright message is left in tact
// Alterations are permitted but please let me know of any changes you make, specifically where incompatibility is concerned
// some contstant declarations
define('UPDATER_PREFIX_TEXT', 'Price: ');
define('UPDATER_SB_TITLE', 'Price Breakdown'); // the heading that shows in the Updater sidebox
?>
<script language="javascript" type="text/javascript">
// <![CDATA[
var objPrice, origPrice;
var defaultCurrencyLeft, defaultCurrencyRight;
defaultCurrencyLeft = defaultCurrencyRight = '';
var quantity = false; // do not alter this
var showQuantity = false; // show the quantity the customer has requested in the main price header
var showQuantitySB = false; // show the quantity the customer has requested in the sidebox
var prArr = nameArr = new Array(); // holds an array of prices to be adjusted (for multiple price adjustments)
var _oflag = false; // do not alter this
var seeker = new RegExp(/\(\s*([+-]?)([^0-9]*)([0-9,]+\.[0-9]+)([^0-9)]*)\s*\)/);
// Updater sidebox settings
var _sidebox = false; // set this to: false - don't use or the ID of the sidebox you want the display to insert above (must be exact)
var objSB = false; // this holds the sidebox object
// Second price setting
// the following settings allow a second price to be displayed... if a page is very long this allows you to add another price display
// thanks to Ryk on the Zen Cart forums for the idea and pointing out the issue
var _secondPrice = 'false'; // set this to either false for disabled or supply the ID of an element for the price to appear BEFORE... for example, cartAdd
var _SPDisplay = 'update'; // governs the behaviour of the second... 'always' permanently displays and 'update' shows the second price only when an attribute is selected
var objSP = false; // please don't adjust this
// debug settings
var _debug = false; // set to false to disable debug output
var _db = '';
var _dbdiv = false;
function init() { // discover the selects that are required to adjust the main price
var centre = document.getElementById('productGeneral');
var objSel = centre.getElementsByTagName('SELECT');
var objInp = centre.getElementsByTagName('INPUT');
var db = '';
var _flag = false; // flag to decide if a load of attribute information is needed
if (!_oflag) { // get the base price and the quantity box (if it exists)
// firstly find out if debug messages should be shown
if (_debug === true) { // build the div that will hold debug messages
createdb();
}
if (_secondPrice !== false && _SPDisplay == 'always') {
regdb('SP Onload', 'Type: ' + _SPDisplay);
updSP();
}
// quantity box
var qtemp = document.getElementById('cartAdd');
if (qtemp) { // got the containing div... go for the quantity!
var itemp = qtemp.getElementsByTagName('INPUT');
if (itemp) { // make sure some inputs are available to scan
for (var i=0; itemp[i]; i++) {
if (itemp[i].name == 'cart_quantity') { // we have the input we need
quantity = itemp[i].value;
regdb('Onload quantity', 'Cart add INPUT discovered (' + quantity + ')');
itemp[i].onkeyup = function () { adjQuan(this); }
}
}
}
}
// if quantity is still false we'll assign it a value of 1
if (quantity === false) quantity = 1;
if (!(objPrice = document.getElementById('productPrices').getElementsByTagName('SPAN')[1])) {
objPrice = document.getElementById('productPrices');
} else {
regdb('Onload sale', 'Looks like an item on sale');
}
origPrice = Number(objPrice.innerHTML.match(/([0-9,.]+)/g)[0].replace(/,/g, ''));
var origHTML = objPrice.innerHTML;
var db = '';
if (!origPrice) {
db = 'Initial phase failure';
if (objPrice) {
db += ' - H2 found';
var temp = objPrice.getElementsByTagName('SPAN');
for (var i=0; temp[i]; i++) {
if (temp[i].className = 'productSpecialPrice') {
origPrice = temp[i].innerHTML.match(/([0-9,.]+)/g)[0].replace(/,/g, '');
db += ' - price in SPAN';
origHTML = temp[i].innerHTML;
if (!origPrice) return;
}
}
} else {
db += ' - price not found!';
return;
}
} else {
db = 'Price found: ' + origPrice;
}
regdb('Onload base price', db);
// try and find the default currency symbols
var temp = origHTML.match(/s*([^0-9 ]*)([0-9.,]+)(.*)/);
defaultCurrencyLeft = temp[1];
db = 'Left: ' + defaultCurrencyLeft;
defaultCurrencyRight = temp[3];
db += ' - Right: ' + defaultCurrencyRight;
regdb('Onload default currency locator', db);
}
for (var i=0; objSel[i]; i++) {
var _this = objSel[i];
objSel[i].onchange = function () { updatePrice(this); }
db = 'Name - ' + objSel[i].name + ' : ID - ' + objSel[i].id;
// scan the attributes to find out if any adjustments are needed
var matches = objSel[i][objSel[i].selectedIndex].text.match(seeker);
if (matches) { // yep
db += ' - Adjusted!';
prArr[objSel[i].id] = new Array();
prArr[objSel[i].id]['p'] = Number(matches[3].replace(/,/, '')); // push the value onto the stack
prArr[objSel[i].id]['n'] = objSel[i][objSel[i].selectedIndex].text.replace(seeker, '');
prArr[objSel[i].id]['m'] = matches[1]; // mode indicator
prArr[objSel[i].id]['l'] = matches[2]; // left side currency indeicator
prArr[objSel[i].id]['r'] = matches[4]; // the right side currency indicator
_flag = true;
}
regdb ('Onload SELECT', db);
}
for (var i=0; objInp[i]; i++) {
if (objInp[i].type == 'radio' || objInp[i].type == 'checkbox') { // make sure we're dealing with radio boxes
db = 'Name - ' + objInp[i].name + ' : ID - ' + objInp[i].id;
matches = objInp[i].nextSibling.innerHTML.match(seeker);
if (matches) {
db += ' : Adjusted!';
objInp[i].onclick = function () { updateR(this); }
if (objInp[i].checked) updateR(objInp[i]);
}
}
regdb('Onload RAD/CH', db);
}
if (_flag && !_oflag) {
updatePriceNow();
}
if (_oflag === true) regdb('Onload', '--- End of loading procedures ---');
_oflag = true;
}
function updSP() {
// adjust the second price display; create the div if necessary
var flag = false; // error tracking flag
if (_secondPrice !== false) { // second price is active
var centre = document.getElementById('productGeneral');
var temp = document.getElementById('productPrices');
var itemp = document.getElementById(_secondPrice);
if (objSP === false) { // create the second price object
if (!temp || !itemp) flag = true;
if (!flag) {
objSP = temp.cloneNode(true);
objSP.id = temp.id + 'Second';
regdb('updSP', 'Price node cloned!');
if (!itemp.parentNode.insertBefore(objSP, itemp.nextSibling)) {
regdb('updSP', 'Unable to insert node at point ' + _secondPrice);
} else {
regdb('updSP', 'Node inserted successfully');
}
} else {
regdb('updSP', 'Unable to clone price node!');
}
}
regdb('updSP', 'Duplicating price, by jove!');
objSP.innerHTML = temp.innerHTML;
} else { // second price inactive
regdb('updSP', 'Cancelled');
}
}
function adjQuan(objInp) {
// adjust the global cart quantity for multiplication
var newVal = Number(objInp.value.match(/[0-9]+/g));
quantity = newVal;
regdb('Quantity change', newVal);
updatePriceNow();
if (_sidebox !== false && objSB === false) createSB();
if (objSB !== false) updateSB(); // update the sidebox
}
function updateR(objInp) {
var matches = objInp.nextSibling.innerHTML.match(seeker);
var priceAdj, totalAdj = 0;
var flag = false;
var db = '';
if (matches) { // make sure this attribute is price-adjust-worthy
db += '*Adj* - ';
priceAdj = Number(matches[3].replace(/,/g, '')); // Number(matches[0].match(/[0-9.]+/)[0]);
} else {
db += '*No adj* - ';
priceAdj = 0;
}
if (objInp.type == 'radio') {
// the radio type input can be inserted into the array using its name as a reference as radio boxes are mutually
// exclusive in their group
db += 'Radio - Name: ' + objInp.name + ' - ';
prArr[objInp.name] = new Array();
prArr[objInp.name]['p'] = priceAdj; // push the price adjustment into the array referenced by the ID of the calling select
prArr[objInp.name]['n'] = objInp.nextSibling.innerHTML.replace(seeker, '');
prArr[objInp.name]['m'] = matches[1];
prArr[objInp.name]['l'] = matches[2]; // left side currency indeicator
prArr[objInp.name]['r'] = matches[4]; // the right side currency indicator
db += 'Price adjust: ' + priceAdj + ' - Mode: ' + matches[1];
} else {
// checkboxes are always autonomous so can have multiple selections from a group so use the ID as before
if (objInp.checked) {
db += 'Checkbox - ID: ' + objInp.id + ' - ';
prArr[objInp.id] = new Array();
prArr[objInp.id]['p'] = priceAdj; // push the price adjustment into the array referenced by the ID of the calling select
prArr[objInp.id]['n'] = objInp.nextSibling.innerHTML.replace(seeker, ''); // attribute name, price removed
prArr[objInp.id]['m'] = matches[1]; // the mode (+, - or base) of the attribute
prArr[objInp.id]['l'] = matches[2]; // left side currency indeicator
prArr[objInp.id]['r'] = matches[4]; // the right side currency indicator
db += 'Price adjust: ' + priceAdj + ' - Mode: ' + matches[1];
} else {
prArr[objInp.id] = null;
db = 'Checkbox ID ' + objInp.id + ' is now NULL';
}
}
regdb('updateR', db);
updatePriceNow();
}
function updatePrice(objSel) { // update the main price from the value extracted by the regex
var matches = objSel[objSel.selectedIndex].text.match(seeker);
var priceAdj, totalAdj = 0;
var db = '';
if (matches) { // make sure this attribute is price-adjust-worthy
db = '*Adj* - ';
priceAdj = Number(matches[3].replace(/,/g, ''));
} else {
db = '*No adj* - ';
priceAdj = 0;
}
if (matches) {
prArr[objSel.id] = new Array();
prArr[objSel.id]['p'] = priceAdj; // push the price adjustment into the array referenced by the ID of the calling select
prArr[objSel.id]['n'] = objSel[objSel.selectedIndex].text.replace(seeker, '');
prArr[objSel.id]['m'] = matches[1];
prArr[objSel.id]['l'] = matches[2]; // left side currency indeicator
prArr[objSel.id]['r'] = matches[4]; // the right side currency indicator
db += 'ID: ' + objSel.id + ' - Price adjust: ' + priceAdj + ' - Mode: ' + matches[1];
} else {
prArr[objSel.id] = null;
db = 'SELECT ID ' + objSel.id + ' is now NULL';
}
regdb('updatePrice', db);
updatePriceNow();
}
function updatePriceNow() { // update the price display
var totalAdj = 0;
var db = '';
var l = defaultCurrencyLeft;
var r = defaultCurrencyRight;
for (var i in prArr) {
if (prArr[i] == '') {
l = (prArr[i]['l'] == '' || typeof(prArr[i]['l']) == 'undefined' ? defaultCurrencyLeft : prArr[i]['l']);
r = (prArr[i]['r'] == '' ? defaultCurrencyRight : prArr[i]['r']);
db = 'Item: ' + prArr[i]['n'] + ' - ';
switch (true) { // adjust the price according to its given mode
case prArr[i]['m'] == '+': // add the attribute price to the base price
db += 'Mode: Add';
db += ' - totalAdj: ' + totalAdj + ' - Adding ' + prArr[i]['p'];
totalAdj += prArr[i]['p'];
break;
case prArr[i]['m'] == '-': // subtract the attribute price from the base
db += 'Mode: Subtract';
db += ' - totalAdj: ' + totalAdj + ' - Subtracting ' + prArr[i]['p'];
totalAdj -= prArr[i]['p'];
break;
case prArr[i]['m'] == '': // this means the attribute actually replaces the base price
db += 'Mode: Base';
db += ' - Altering base to ' + prArr[i]['p'];
origPrice = prArr[i]['p'];
break;
}
regdb('updatePriceNow', db);
}
}
var newPrice = ((origPrice + totalAdj) * quantity).toFixed(2);
document.getElementById('productPrices').innerHTML = '<?php echo UPDATER_PREFIX_TEXT; ?>' + l + addCommas(newPrice) + r + (showQuantity ? ' (' + quantity + ')' : '');
if (_sidebox !== false && objSB === false) createSB();
if (objSB !== false) updateSB(); // update the sidebox
updSP();
}
function createSB() { // create the sidebox for the attributes info display
if (_sidebox !== false) {
var temp = document.getElementById(_sidebox); // get a handle to the sidebox to insertBefore
if (temp) {
objSB = document.createElement('DIV'); // create the sidebox wrapper
objSB.id = 'updaterSB';
objSB.className = 'leftBoxContainer'; // set the CSS reference
// create the heading bit
var tempH = document.createElement('H3');
tempH.id = 'updateSBHeading';
tempH.className = 'leftBoxHeading';
tempH.innerHTML = '<?php echo UPDATER_SB_TITLE; ?>';
objSB.appendChild(tempH);
// create the content div
var tempC = document.createElement('DIV');
tempC.id = 'updaterSBContent';
tempC.className = 'sideBoxContent';
tempC.innerHTML = 'If you can read this Chrome has broken something';
objSB.appendChild(tempC);
temp.parentNode.insertBefore(objSB, temp);
regdb('createSB', 'Sidebox created!');
} else {
regdb('createSB', 'Sidebox could not be created!');
}
}
}
function updateSB() { // update the contents of the sidebox with the updated info from the attributes selector
var newText = hText = '';
var l = defaultCurrencyLeft;
var r = defaultCurrencyRight;
var totalAdj = origPrice;
for (var i in prArr) {
if (prArr[i] == '') {
l = (prArr[i]['l'] == '' || typeof(prArr[i]['l']) == 'undefined' ? defaultCurrencyLeft : prArr[i]['l']);
r = (prArr[i]['r'] == '' ? defaultCurrencyRight : prArr[i]['r']);
if (prArr[i]['m'] !== null && prArr[i]['m'] != '') {
if (prArr[i]['m'] == '-') newText += '<span style="color: red;">';
newText += prArr[i]['n'] + (prArr[i]['p'] != 0 ? ' - ' + (showQuantitySB ? quantity + 'x ' : '') + prArr[i]['l'] + prArr[i]['p'].toFixed(2) + prArr[i]['r']: '') + '<br/>';
if (prArr[i]['m'] == '-') newText += '<\/span>';
switch (true) { // adjust the price according to its given mode
case prArr[i]['m'] == '+': // add the attribute price to the base price
totalAdj += prArr[i]['p'];
break;
case prArr[i]['m'] == '-': // subtract the attribute price from the base
totalAdj -= prArr[i]['p'];
break;
case prArr[i]['m'] == '': // this means the attribute actually replaces the base price
origPrice = prArr[i]['p'];
break;
}
}
}
}
hText += 'Product price - ' + (showQuantitySB ? quantity + 'x ' : '') + l + addCommas(origPrice.toFixed(2)) + r + '<br/>';
newText += '<hr />Total: ' + l + addCommas((totalAdj * quantity).toFixed(2)) + r;
// I know innerHTML is cheating but I careth not :)
objSB.getElementsByTagName('DIV')[0].innerHTML = hText + newText;
}
function addCommas(nStr)
{ // this function can be found at http://www.mredkj.com/javascript/numberFormat.html#addcommas
nStr += '';
var x = nStr.split('.');
var x1 = x[0];
var x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + ',' + '$2');
}
return x1 + x2;
}
function createdb () {
var centre = document.getElementById('productGeneral');
if (_dbdiv === false) {
_dbdiv = document.createElement('DIV');
_dbdiv.style.border = '2px dashed #666';
_dbdiv.style.padding = '0.1em';
centre.appendChild(_dbdiv)
}
_dbdiv.innerHTML = '<div style="cursor: pointer; width: 100%; text-align: center; margin-bottom: 5px; background-color: #aaa; padding: 1px; font-size: 110%; font-weight: bold;" onclick="createdb();">Debug messages<\/div>';
}
function regdb(strTitle, strText) { // simple routine to format and output the debug messages
if (_debug === true) { // make sure debug messages should be displayed
_dbdiv.innerHTML += '<div style="margin: 2px 0; background-color: #ddd; border-top: 1px solid #aaa; border-bottom: 1px solid #aaa;"><span style="font-weight: bold;">' + strTitle + ':<\/span> ' + strText + '<\/div>';
}
}
// the following statements should allow multiple onload handlers to be applied
// I know this type of event registration is technically deprecated but I decided to use it because I haven't before
// There shouldn't be any fallout from the downsides of this method as only a single function is registered (and in the bubbling phase of each model)
// For backwards compatibility I've included the traditional DOM registration method
try { // the IE event registration model
window.attachEvent('onload', init);
} catch (e) { // W3C event registration model
window.addEventListener('load', init, false);
} finally {
window.onload = init;
}
// ]]></script>
Help Please.
Fred
-
Re: Dynamic Price Updater
Hi all
Sorry for taking ages to reply... I've been away from my machine for some time and I'm just now getting caught up with everything
The tax problem I think I have an idea about now so I'm going to be looking into it as soon as I can
Fred, have you tried V2 of the Updater to see what that makes of your attributes? I know V2 has some issues currently but these seem to largely revolve around the tax class
Let me know and I will also check out your site
Cheers
Dan
-
Re: Dynamic Price Updater
Hi Dan, Check out the test product I set up with some attributes:
http://f i s h p e t l o v e . c o m /test
Just put the letters together and you will be there
I tried V2 also, but V2 had more problems. v1 gives the following error in the little triangle (Done but with errors) only shows in Internet explorer:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Wed, 19 May 2010 02:59:25 UTC
Message: Object required
Line: 158
Char: 4
Code: 0
URI: http://f i s h p e t l o v e . c o m /test
Message: Object required
Line: 158
Char: 4
Code: 0
URI: http://f i s h p e t l o v e . c o m /test
Thanks
Fred.
-
Re: Dynamic Price Updater
After looking at the error couple of times I figured out how to fix the problem, hopefully my fix is not going to kick me back :lamo: We will find out in the next couple of weeks, but here it goes:
Code:
for (var i=0; objInp[i]; i++) {
if (objInp[i].type == 'radio' || objInp[i].type == 'checkbox') { // make sure we're dealing with radio boxes
db = 'Name - ' + objInp[i].name + ' : ID - ' + objInp[i].id;
//Fred C fix
if(objInp[i].nextSibling != null){
//end Fred C fix
matches = objInp[i].nextSibling.innerHTML.match(seeker);
if (matches) {
db += ' : Adjusted!';
objInp[i].onclick = function () { updateR(this); }
if (objInp[i].checked) updateR(objInp[i]);
}
}
//Fred C fix
}
//end Fred C fix
regdb('Onload RAD/CH', db);
}
Fred. :smile:
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
Ajeh
The display is manage by the class in the template ... so I made the one at the top use a different class so the price did not change and put one at the bottom where the add to cart quantity is put in that had the class that gets changed ...
This way, the original price always shows on the page and the changing price of what the "actual" price will be based on quantity etc. would show right where the customer is working down by the attributes and add to cart quantity box ...
Hi Linda,
I failed to make DPU still showing the original price (didn't chnaged), instead of replacing it by just 'Your price: xxxx' because we have special price, so we can show how both original price and discount price.
I tried your method building a new class, above but couldn't get it to work, can you show me example of the file you modified?
I mean the file:
/classes/dynamic_price_updater.php
Thanks so much!
-
Re: Dynamic Price Updater
From what I remember on this one the:
zen_get_products_display_price
was in the :
<h2 id="productPrices" class="productGeneral">
and the update prices affect that ...
I just repeated the code without that and used a new class ...
-
Re: Dynamic Price Updater
I've installed this mod and it's working well. I've also installed this mod (http://www.zen-cart.com/forum/showthread.php?t=98641) to enable me to have a drop down menu on the product listing page rather than just the product info page. How would I go about having the price on that page dynamically update just like it does with the product info page?
-
Re: Dynamic Price Updater
To add a little bit more to my previous post...here is a link to my work-in-progress: https://www.mcqueeneycoins.com/index...ndex&cPath=1_2 showing the attribute drop-down mod in action.
On this page I want the prices to dynamically update when an attribute is selected, just as it does on the individual product's page. If anyone can shed some light on this for me I'm forever in your debt.
Thanks!
-
Dpu2
i think
PHP Code:
$this->_responseText['priceTotal'] .= $currencies->display_price($this->_shoppingCart->total, $product_check->fields['products_tax_class_id']);
should be
PHP Code:
$this->_responseText['priceTotal'] .= $currencies->display_price($this->_shoppingCart->total, 0);
because, if $product_check->fields['products_tax_class_id'] > 0 , this tax-value is added to priceTotal; the tax was already added
-
Re: Dynamic Price Updater
has anyone got an idea how to get this working with dual pricing- wholesale, and replace product images on attribute change? i know this has been asked before and i know you have a long list of stuff to do dan, but if you could point me in the right direction i might be able to figure it out, also i am willing to make a donation if you could get these 2 working with this mod.
i have a test set up here:
http://southcrystals.com/index.php?m...products_id=22
i had both of these mods working before DPUv2
this is zc 1.3.8a
and if you need ftp in order to help me out just let me know.
also how do i remove the product quantity in parenthesis?
thank you so much for all of your time and energy into this dan, i have read through almost everythread of this topic and used a few of your fixes aready to get it working so far, but i do really need these other two working as well, as they took me forever to get working too.
-
Re: Dynamic Price Updater
ok, so i am assuming that the file that mainly needs to be edited is
includes/classes/dynamic_price_updater.php (to get the dual price - wholesale price mod to work)
here is what i have changed it to
Code:
<?php
// (c) D Parry (Chrome) 2009 ([email protected])
// This module is free to distribute and use as long as the above copyright message is left in tact
class DPU {
/**
* Current Zen Cart database object
*
* @var object
*/
var $_db;
/**
* Local copy of the POST array
*
* @var array
*/
var $_post = array();
/**
* Local instantiation of the shopping cart
*
* @var object
*/
var $_shoppingCart;
/**
* The type of message being sent (error or success)
*
* @var string
*/
var $_responseType = 'success';
/**
* Array of lines to be sent back. The key of the array provides the attribute to identify it at the client side
* The array value is the text to be inserted into the node
*
* @var array
*/
var $_responseText = array();
/**
* Constructor
*
* @param obj The Zen Cart database class
* @return DPU
*/
function __construct(&$db) {
$this->_db =& $db;
$this->_post =& $_POST;
// grab the shopping cart class and instantiate it
require_once(DIR_WS_CLASSES.'shopping_cart.php');
$this->_shoppingCart = new shoppingCart();
}
/**
* PHP4 constructor
*
* @param obj ZC DB object
* @return DPU
*/
function DPU(&$db) {
$this->__construct($db);
}
/**
* Wrapper to call all methods to generate the output
*
* @return void
*/
function getDetails() {
$this->insertProduct();
$this->_shoppingCart->calculate();
if (DPU_SHOW_SIDEBOX) $this->getSideboxContent();
$this->prepareOutput();
$this->dumpOutput();
}
/**
* Wrapper to call all methods relating to returning multiple prices for category pages etc.
*
* @return void
*/
function getMulti() {
$this->insertProducts();
}
/**
* Prepares the shoppingCart contents for transmission
*
* @return void
*/
function prepareOutput() {
global $currencies;
$this->_responseText['priceTotal'] = UPDATER_PREFIX_TEXT;
$product_check = $this->_db->Execute("select products_tax_class_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$this->_post['products_id'] . "'" . " limit 1");
if (false == DPU_SHOW_CURRENCY_SYMBOLS) {
$this->_responseText['priceTotal'] .= number_format($this->_shoppingCart->total, 2);
} else {
$this->_responseText['priceTotal'] .= $currencies->display_price($this->_shoppingCart->total, $product_check->fields['products_tax_class_id']);
}
$this->_responseText['weight'] = (string)$this->_shoppingCart->weight;
if (DPU_SHOW_QUANTITY) {
$this->_responseText['quantity'] = sprintf(DPU_SHOW_QUANTITY_FRAME, $this->_shoppingCart->contents[$this->_post['products_id']]['qty']);
}
}
/**
* Inserts multiple non-attributed products into the shopping cart
*
* @return void
*/
function insertProducts() {
foreach ($this->_post['products_id'] as $id => $qty) {
$this->_shoppingCart->contents[] = array($id);
$this->_shoppingCart->contents[$id] = array('qty' => (float)$qty);
}
var_dump($this->_shoppingCart);
die();
}
/**
* Inserts the product into the shoppingCart content array
*
* @returns void
*/
function insertProduct() {
$this->_shoppingCart->contents[$this->_post['products_id']] = array('qty' => (float)$this->_post['cart_quantity']);
$attributes = array();
foreach ($this->_post as $key => $val) {
if (is_array($val)) {
foreach ($val as $k => $v) {
$attributes[$k] = $v;
}
}
}
if (is_array($attributes)) {
reset($attributes);
while (list($option, $value) = each($attributes)) {
//CLR 020606 check if input was from text box. If so, store additional attribute information
//CLR 020708 check if text input is blank, if so do not add to attribute lists
//CLR 030228 add htmlspecialchars processing. This handles quotes and other special chars in the user input.
$attr_value = NULL;
$blank_value = FALSE;
if (strstr($option, TEXT_PREFIX)) {
if (trim($value) == NULL) {
$blank_value = TRUE;
} else {
$option = substr($option, strlen(TEXT_PREFIX));
$attr_value = stripslashes($value);
$value = PRODUCTS_OPTIONS_VALUES_TEXT_ID;
$this->_shoppingCart->contents[$this->_post['products_id']]['attributes_values'][$option] = $attr_value;
}
}
if (!$blank_value) {
if (is_array($value) ) {
reset($value);
while (list($opt, $val) = each($value)) {
$this->_shoppingCart->contents[$this->_post['products_id']]['attributes'][$option.'_chk'.$val] = $val;
}
} else {
$this->_shoppingCart->contents[$this->_post['products_id']]['attributes'][$option] = $value;
}
}
}
}
// $this->_shoppingCart->cleanup();
}
/**
* Prepares the output for the Updater's sidebox display
*
*/
function getSideboxContent() {
global $currencies;
$product_check = $this->_db->Execute("select products_tax_class_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$this->_post['products_id'] . "'" . " limit 1");
$product_query = "select products_id, products_price, products_tax_class_id, products_weight,
products_priced_by_attribute, product_is_always_free_shipping, products_discount_type, products_discount_type_from,
products_virtual, products_model
from " . TABLE_PRODUCTS . "
where products_id = '" . (int)$this->_post['products_id'] . "'";
$product = $this->_db->Execute($product_query);
$prid = $product->fields['products_id'];
$products_tax = zen_get_tax_rate($product->fields['products_tax_class_id']);
// $products_price = $product->fields['products_price']; - REMOVED FOR DUAL PRICING MOD
//*************************************************************
//***** CHECK WHETHER WHOLESALE OR RETAIL AND GET CORRECT PRICE
//*************************************************************
if ($_SESSION['customer_id']) {
$customers_id = $_SESSION['customer_id'];
$customer_check = $db->Execute("select * from " . TABLE_CUSTOMERS . " where customers_id = '$customers_id'");
if ($customer_check->fields['customers_whole'] != "0") {
$i = $customer_check->fields['customers_whole'];
$i = $i-1;
$products_price_array = $product->fields['products_price_w'];
$productsprice = explode("-",$products_price_array);
$products_price = $productsprice[$i];
if ($products_price == '0' || $products_price == '') {
$products_price = $productsprice[0];
}
if ($products_price=='0'){
$products_price = $product->fields['products_price'];
}
} else {
$products_price = $product->fields['products_price'];
}
} else {
$products_price = $product->fields['products_price'];
}
//****************************************************************
//*****END CHECK WHETHER WHOLESALE OR RETAIL AND GET CORRECT PRICE
//****************************************************************
$qty = $this->_post['cart_quantity'];
$out = array();
$global_total;
reset($this->_shoppingCart->contents[$this->_post['products_id']]['attributes']);
while (list($option, $value) = each($this->_shoppingCart->contents[$this->_post['products_id']]['attributes'])) {
$adjust_downloads ++;
$attribute_price_query = "select *
from " . TABLE_PRODUCTS_ATTRIBUTES . "
where products_id = '" . (int)$prid . "'
and options_id = '" . (int)$option . "'
and options_values_id = '" . (int)$value . "'";
$attribute_price = $this->_db->Execute($attribute_price_query);
$sql = "SELECT
`products_options_values_name`
FROM
".TABLE_PRODUCTS_OPTIONS_VALUES."
WHERE
`products_options_values_id` = $value";
$data = $this->_db->Execute($sql);
$name = $data->fields['products_options_values_name'];
$new_attributes_price = 0;
$discount_type_id = '';
$sale_maker_discount = '';
$total = 0;
if ($attribute_price->fields['product_attribute_is_free'] == '1' and zen_get_products_price_is_free((int)$prid)) {
// no charge for attribute
} else {
// + or blank adds
if ($attribute_price->fields['price_prefix'] == '-') {
// appears to confuse products priced by attributes
if ($product->fields['product_is_always_free_shipping'] == '1' or $product->fields['products_virtual'] == '1') {
$shipping_attributes_price = zen_get_discount_calc($product->fields['products_id'], $attribute_price->fields['products_attributes_id'], $attribute_price->fields['options_values_price'], $qty);
$this->free_shipping_price -= $qty * zen_add_tax( ($shipping_attributes_price), $products_tax);
}
if ($attribute_price->fields['attributes_discounted'] == '1') {
// calculate proper discount for attributes
$new_attributes_price = zen_get_discount_calc($product->fields['products_id'], $attribute_price->fields['products_attributes_id'], $attribute_price->fields['options_values_price'], $qty);
$total -= $qty * zen_add_tax( ($new_attributes_price), $products_tax);
} else {
$total -= $qty * zen_add_tax($attribute_price->fields['options_values_price'], $products_tax);
}
$total = '-'.$total;
} else {
// appears to confuse products priced by attributes
if ($product->fields['product_is_always_free_shipping'] == '1' or $product->fields['products_virtual'] == '1') {
$shipping_attributes_price = zen_get_discount_calc($product->fields['products_id'], $attribute_price->fields['products_attributes_id'], $attribute_price->fields['options_values_price'], $qty);
$this->free_shipping_price += $qty * zen_add_tax( ($shipping_attributes_price), $products_tax);
}
if ($attribute_price->fields['attributes_discounted'] == '1') {
// calculate proper discount for attributes
$new_attributes_price = zen_get_discount_calc($product->fields['products_id'], $attribute_price->fields['products_attributes_id'], $attribute_price->fields['options_values_price'], $qty);
$total += $qty * zen_add_tax( ($new_attributes_price), $products_tax);
// echo $product->fields['products_id'].' - '.$attribute_price->fields['products_attributes_id'].' - '. $attribute_price->fields['options_values_price'].' - '.$qty."\n";
// $products_price = $product->fields['products_price']; - REMOVED FOR DUAL PRICING MOD
//*************************************************************
//***** CHECK WHETHER WHOLESALE OR RETAIL AND GET CORRECT PRICE
//*************************************************************
if ($_SESSION['customer_id']) {
$customers_id = $_SESSION['customer_id'];
$customer_check = $db->Execute("select * from " . TABLE_CUSTOMERS . " where customers_id = '$customers_id'");
if ($customer_check->fields['customers_whole'] != "0") {
$i = $customer_check->fields['customers_whole'];
$i = $i-1;
$products_price_array = $products->fields['products_price_w'];
$productsprice = explode("-",$products_price_array);
$products_price = $productsprice[$i];
if ($products_price == '0' || $products_price == '') {
$products_price = $productsprice[0];
}
if ($products_price=='0'){
$products_price = $products->fields['products_price'];
}
} else {
$products_price = $products->fields['products_price'];
}
} else {
$products_price = $products->fields['products_price'];
}
//****************************************************************
//*****END CHECK WHETHER WHOLESALE OR RETAIL AND GET CORRECT PRICE
//****************************************************************
} else {
$total += $qty * zen_add_tax($attribute_price->fields['options_values_price'], $products_tax);
}
}
}
$global_total += $total;
$qty2 = sprintf(DPU_SIDEBOX_QUANTITY_FRAME, $this->_post['cart_quantity']);
$total = sprintf(DPU_SIDEBOX_PRICE_FRAME, $currencies->display_price($total, $product_check->fields['products_tax_class_id']));
$out[] = sprintf(DPU_SIDEBOX_FRAME, $name, $total, $qty2);
}
$out[] = sprintf(DPU_SIDEBOX_TOTAL_FRAME, $currencies->display_price($this->_shoppingCart->total, $product_check->fields['products_tax_class_id']));
$qty2 = sprintf(DPU_SIDEBOX_QUANTITY_FRAME, $this->_post['cart_quantity']);
$total = sprintf(DPU_SIDEBOX_PRICE_FRAME, $currencies->display_price($this->_shoppingCart->total-$global_total, $product_check->fields['products_tax_class_id']));
array_unshift($out, sprintf(DPU_SIDEBOX_FRAME, 'Base price', $total, $qty2));
$this->_responseText['sideboxContent'] = implode('', $out);
}
/**
* Performs an error dump
*
* @param mixed $errorMsg
*/
function throwError($errorMsg) {
$this->_responseType = 'error';
$this->_responseText[] = $errorMsg;
$this->dumpOutput();
}
/**
* Formats the response and flushes with the appropriate headers
* This should be called last as it issues an exit
*
* @return void
*/
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
echo '<root>'."\n".'<responseType>'.$this->_responseType.'</responseType>'."\n";
// now loop through the responseText nodes
foreach ($this->_responseText as $key => $val) {
echo '<responseText'.(!is_numeric($key) && !empty($key) ? ' type="'.$key.'"' : '').'><![CDATA['.$val.']]></responseText>'."\n";
}
die('</root>');
}
}
i know i am not doing this right, i see that i have inserted the wholesale code into a function, and im not good with this stuff, but i will keep playing around.
-
Re: Dynamic Price Updater
i have figured why (i think) i cannot get this to work.
it is calculating from priceTotal which is from the price update mod only, so it will not show any other prices. i am unsure how to merge these....
i will leave it alone for now, but ANY ideas are welcome, thank you!
-
Re: Dynamic Price Updater
Hi!,
I install this tool and works ok, but then the "attribute replace main product image" don´t work.
I want that when customer select an attribute, for example a color that is moore expensive, the main product image and price change to the new image and price.
Separately the DPU and "attribute replace main product image" works ok, but not together.
Anyone knows how can I obtain this effect or why this two modules don´t work together?
Thank you very much.
-
Re: Dynamic Price Updater
Hi,
I had the problem with attributes replaces main image not working with dpu. I came up with a fix which is below which should work for you, let me know if it does.
Place the code within your tpl_modules_attributes.php and change attrib-2 with the attribute of you option(go into view source to find it). within the code that produces the dropdown on your page you will see code similar to 'getattribimage("id[2]",547,500, this.value,2);' replace it with what you see in the same format, this will ensure the image size remains the same.
<script type="text/javascript">
function afunc(){
getattribimage("id[2]",547,500, this.value,2);
}
var
el=document.getElementById("attrib-2");
try{
el.addEventListener("change",afunc, false);
}
catch(e){
try{
el.attachEvent("onchange",afunc);
}
catch(e){
el.onchange=afunc;
}
}
</script>
Let me know if you have any problems with this, if you have more than one attribute that will replace the attribute image I can help you out with some extra code
-
Re: Dynamic Price Updater
Thank you Chrome for this wonderful mod. It didn't work at first but then tested it some and then finally realized that DPU and the product image slimbox powered by Javascript clashes. When I removed the javascript from html_header.php DPU worked like a charm. I know there has been many issues with lightbox, slimbox, and all the other "boxes" not being compatible with other scripts. Do you by any chance know how to make them play nicely? I know it's all about changing the name of a variable but not sure which and where to look in the coding.
-
Re: Dynamic Price Updater
Thank you bigsy85.
I Understand exactly where I have to put the code in tpl_modules_attributes.php.
I search getattribimage, but not find. Could you please said me where I have to put the code?.
Thank you again
-
Re: Dynamic Price Updater
You can place the javascript anywhere within that file, when I reffered to finding the 'attrib-2' name I meant on your actual html page to find that value. For another site I run I'vre managed to get it running a slightly different way but the code posted earlier should work - if not i'll take alook at your site tonight and help you out.
-
Re: Dynamic Price Updater
really thank you very much for your interest.
OK, i´m copied the code you post in tpl_modules_attributes.php, and change attrib-2 by attrib-1, that I found in my source, but I think i´m doing something wrong.
This night I will be online waiting for your help about 22:30 pm.
thanks thanks, I think solve this can give other users a perfect tool for this superb cart. ;-)
See you tonight
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
Sheryll
Thank you Chrome for this wonderful mod. It didn't work at first but then tested it some and then finally realized that DPU and the product image slimbox powered by Javascript clashes. When I removed the javascript from html_header.php DPU worked like a charm. I know there has been many issues with lightbox, slimbox, and all the other "boxes" not being compatible with other scripts. Do you by any chance know how to make them play nicely? I know it's all about changing the name of a variable but not sure which and where to look in the coding.
If anyone is having a similar problem to this I figured out a way to get around this. If you download the zen cart version of the slimbox, it's slimbox1 and that is run by mootools. just install everything following the instructions. Once you install it, google slimbox2 and upgrade it. slimbox2 uses jquery instead of mootools so it does not have any conflict with DPU.
-
Re: Dynamic Price Updater
I installed version 2 of this mode. wondering , what is (1) beside the price and how can i remove ?
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
tony_sar
I installed version 2 of this mode. wondering , what is (1) beside the price and how can i remove ?
never mind , it is quantity ..
-
Re: Dynamic Price Updater
I guys...
Thanks a lot for this contribution.. Great Job I would say.
BUT, this module does not support the internationalisation, and I'm using also a french language.
Is there a chance to get this module with the Internationalisation support ?
Or should I have some tips to make the job and put it back ?
Thanks for your help
-
Re: Dynamic Price Updater
I've also another problem on products without attributes, the price of the product is 2€ and then is updated to 0€ because there is no attributes.
I've got the version 1.3.8a of the Zencart
Thanks for your help
-
Re: Dynamic Price Updater
Hi again.
I continues with the problem of incompatibility of DPU and atributes replace main product image.
I know Sheryll say something about mootols, but I don´t know what I have to do.
Please could anyone help me.
Thank you very very much
-
Re: Dynamic Price Updater
Chrome,
This is awesome!
I am having a challenge getting the update to go when my attributes are changed. I have seen other posts where people have had similar issues, but I haven't seen public solutions. Any help on this would save a lot of my skin (there is no hope for saving it all).
Thanks,
Joel
-
Re: Dynamic Price Updater
Never Mind!
Stumbled on the answer when I was addressing another issue. Had to turn my "Show Starting At text on Price" to "true" in the product category ->edit-layout :oops:
-
Re: Dynamic Price Updater
Now I have another issue.
My attributes change the price by fractions of cents, like $0.035 for Y or $0.025 for Y. The mod will use the numbers as they show for the math. i.e. $0.0035 shows as $0.04 and $0.025 shows as $0.03.
Is there any way to work around this?
Thanks everybody!
Joel
-
Re: Dynamic Price Updater
I think that you have to check into the code How the price is genrated, and use some PHP round functions.
-
Re: Dynamic Price Updater
I have just installed Product Attributes Grid and now the Dynamic Price Updater is not working!! HELP!! Does anyone have any advise???
Thanks!:yuck:
-
Re: Dynamic Price Updater
others seemed to have fixed this. but still trying to figure out the fix for the specials price display. the price updater is displaying the specials price with a line through it instead of the list price with a line through it.
List Price: $157.50
Price: $157.50
Save: 10% off
i've searched and found references to this problem, but not the fix. which file do i need to change tpl_product_info_display??? and what is the change???
thanks
-
Re: Dynamic Price Updater
Hi,
Thanks for the mod. I have a problem with removing the (+price) though. I have upgraded to the DPUV2 and still cannot have the DPU works if I remove the (+price).
The way I remove the (+price) is to change the attributes.php line 158 to
$products_options_display_price='';
I know that you mention it earlier in the post that the V2 version does not depend on the price text but it still does not work for me. Do I do something wrong in the attempt to remove the +price?
Thank you,
-
Re: Dynamic Price Updater
Just a little follow up. When the product page initially loads, the correct List Price (or regular price) is shown, then the loader image spins and it replaces it with the sale price...
List Price: $157.50 (Should be 175.00 with a line through it)
Price: $157.50
Save: 10% off
Thanks.
-
Re: Dynamic Price Updater
:oops: I have both version of DPU installed and it is actually the first one that was in effect before. Deleted the V1 and it works now. I don't have the (+price) and the price still update.
Thanks
-
Re: Dynamic Price Updater
:smile:Thanks to everyone who helped with their suggestions and advices. Finally got my store up and running. Almost finished with the tweeks. I do have one question. Is there a mod that will allow business to business customers to NOT be charged taxes (if local) for what they purchase IF they sign an agreement that they will be resposible for paying said taxes. Like if they provide proof that they are a legit business in and of themselves. Or is there a setting that I'm missing in the current setup of zen-cart? This would be a great addon for the Dual-Pricing mod.
-
Re: Dynamic Price Updater
I'm having a little issue with implementation... I uploaded the files, and the loading .gif shows up, but the page pops up an error message dialog that says "Status Returned - not found"
You can see for yourself here:
http://showcatcentral.com/cart/index...r_of_uploads=0
No idea what I'm doing wrong, but as you can see I've customized the template quite a bit... Any ideas? Thanks!
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
ppsoyal
really thank you very much for your interest.
OK, i´m copied the code you post in tpl_modules_attributes.php, and change attrib-2 by attrib-1, that I found in my source, but I think i´m doing something wrong.
This night I will be online waiting for your help about 22:30 pm.
thanks thanks, I think solve this can give other users a perfect tool for this superb cart. ;-)
See you tonight
First of all, thanks for such a practical module. I'm having the same problem with attribute images being displayed upon selection. I've got a custom t-shirt site and this is a critical function of the site, not to mention the countless hrs that are spent generating images for every design on countless products and colors. I tried as instructed to no avail. I'm on the most recent zen and also using a template that's been modified quite a bit:
http://www.templatemonster.com/zenca...tes/21755.html
I'm sure there is similar code to be altered but don't know where to look. Thanks as always for all your thoughts.
-
Re: Dynamic Price Updater
Is this due to a miscommunication between two files? Maybe between the following module and DPU:
http://www.zen-cart.com/index.php?ma...roducts_id=994
Path: ...\includes\modules\your_template\attributes.php
or is the editing to be done found in the DPU jscript_ajax_updater.php file? I know very little about PHP, and there are dozens to look through. Thanks again.
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
WillyWanka666
First of all, thanks for such a practical module. I'm having the same problem with attribute images being displayed upon selection. I've got a custom t-shirt site and this is a critical function of the site, not to mention the countless hrs that are spent generating images for every design on countless products and colors. I tried as instructed to no avail. I'm on the most recent zen and also using a template that's been modified quite a bit:
http://www.templatemonster.com/zenca...tes/21755.html
I'm sure there is similar code to be altered but don't know where to look. Thanks as always for all your thoughts.
template monster templates are crap. they dont validate xhtml or css
http://validator.w3.org/check?uri=ht...Inline&group=0
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
ztotheetothen
I'm sorry for being ignorant. The code that the validation shows me is completely different than when I open it in Dreamweaver. I used the developers toolkit and searched for div class="clear" in all admin/catalog .php/.css/html/txt files.
Every file I open looks completely different than what the W3C markup shows me for the index.php file in my root directory. This would probably be a great tool if I could figure out how to use it properly. Thanks.
-
Re: Dynamic Price Updater
-
Re: Dynamic Price Updater
Hi all
Firstly I need to apologise for being away from the forum thread for so long; it's unforgiveable but it has been quite a year
In the next 2 hours or so I'm going to be uploading a new version of DPU that will hopefully address the incompatibilities with MooTools... As soon as it's online I'll post here
I haven't yet had a chance to scan the thread for other issues but rest assured I am doing so... If anyone has a repeat question they'd like to respost please do so as I don't want to miss anything catching up (there's probably quite a lot)
Again I apologise to everyone who is having problems and promise that I have renewed my efforts to support the Updater
Cheers!
Dan
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
Chrome
Hi all
Firstly I need to apologise for being away from the forum thread for so long; it's unforgiveable but it has been quite a year
In the next 2 hours or so I'm going to be uploading a new version of DPU that will hopefully address the incompatibilities with MooTools... As soon as it's online I'll post here
I haven't yet had a chance to scan the thread for other issues but rest assured I am doing so... If anyone has a repeat question they'd like to respost please do so as I don't want to miss anything catching up (there's probably quite a lot)
Again I apologise to everyone who is having problems and promise that I have renewed my efforts to support the Updater
Cheers!
Dan
Please don't apologize. All your hard work is greatly appreciated. I just sent you an e-mail to my site per request. Thanks again and I hope to hear from you soon. :lookaroun
-
Re: Dynamic Price Updater
Hi
As promised I've uploaded a newer version of DPU to my website... Here's the link
http://chrome.me.uk/DPUv2_MTC.zip
For now I haven't replaced the original DPU so just use that link... Currently, the newer version is only to mitigate conflicts with the MooTools library
Thanks in advance to anyone that helps me test this new version... While I wait for feedback I'm going to start bolstering the routines used to derive the price (like the tax issue and certain discounts)
Watch this space!
Dan
P.S. The only file changed in the archive is includes/modules/pages/product_info/jscript_ajax_updater.php so you can choose to either upload that file alone or unzip and upload the lot... Either way should have the desired effect... Of course, if it doesn't please let me know
-
Re: Dynamic Price Updater
Gotta quick question:
How can I have the DPU show the price when a item is sold out? When the page is refreshed, the price shows at first until the DPU kicks in, then it goes to all zeros.
Great mod...I absolutely love it and clients do too!!
-
Re: Dynamic Price Updater
Hi Chrome, and congratulations for your work.
My real problem with the DPU is about the main product image replacement module, that I have also installed.
For example I have a guitar with various colors and different prices for each color, and I would like that when customer select via attributes a diferent color with different price, the main product image and the price change to show this option.
Can see an example here:
http://multisononline.com/fender-cla...pecial-rw-5429
As you can see the price change, but not the main product image, if I disabled DPU, the main product image change when the attribute change, but not the price.
Do you know how can I resolve this?, is really important for our website. Thank you
-
Re: Dynamic Price Updater
Well... I crossed my fingers, hoped and wished the new version would resolve the conflict that we're all having between these two modules. It didn't. I was really hoping this would work because I really like the DPU. I think it sucks otherwise. Your customer has to get a calculator or go to their shopping cart to see what their product actually costs? Thats retarded, and the DPU solves this. I'll continue to subscribe to this thread, but I'm going to try and find an alternative, after I see if winmerge or the like can't point me in the right direction. I'm a php novice so, if the author can't figure this out, I doubt I will.
-
Re: Dynamic Price Updater
Hi
Hmmm, seems there's a Javascript Ajax conflict that isn't MT related... I'm investigating
Dan
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
Chrome
Hi
Hmmm, seems there's a Javascript Ajax conflict that isn't MT related... I'm investigating
Dan
We look forward to hearing from you soon.
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
WillyWanka666
We look forward to hearing from you soon.
Yess, is really a good job and the functionality with image replacement will be perfect :D
-
Re: Dynamic Price Updater
LOL! I tried using winmerge and had know idea what I was looking for, or which file to replace or alter, if at all. The only two files that have the same name is the attribute.php file. Those two files are in two different directories. I think winmerge is more suited for comparing two files that are trying to accomplish the same task(s). I'm going to start looking for an alternative and report back my findings. If anyone else knows of how to update the displayed price upon selection of an attribute, PLEASE let us know. I'm truly baffled by the idea that this is not a preexisting function of zencart.
-
Re: Dynamic Price Updater
Hi
Just to let everyone know that I am still working on this... I know I've things slide in the past but I'm back on it now :smile:
I haven't had as much time as I'd hoped to work on the attribute image replacement bug as I'd hoped but I have started and have a few ideas... I'll be working on it over the next few days
Cheers
Dan
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
Chrome
Hi
Just to let everyone know that I am still working on this... I know I've things slide in the past but I'm back on it now :smile:
I haven't had as much time as I'd hoped to work on the attribute image replacement bug as I'd hoped but I have started and have a few ideas... I'll be working on it over the next few days
Cheers
Dan
Saweeet! I can't wait. I updated to the latest zen with no problem and can't wait to start marketing my site as soon as I get over this hurdle.
-
Re: Dynamic Price Updater
This guys been coding for 20yrs and He's saying that ZenCart IS capable of dynamically updating a price based on it's attributes. Does anyone know how to do this? I'm on a strict budget with development and I don't want to shell out hundreds if I don't have to.
http://www.thatsoftwareguy.com/zenca...c_pricing.html
-
Re: Dynamic Price Updater
OOOooo! I think I may have found something. I keep everyone "updated": )
http://www.softarea51.com/windows/We..._Zen_Cart.html
-
Re: Dynamic Price Updater
Ok.
Dynamic Price Update+Main Picture replacement done. See my site.
In this case the attribute modify the price and the color:
http://multisononline.com/fender-ame...ter-maple-5422
In this other one the attribute only modify the price:
http://multisononline.com/yamaha-va5s-3554
and in this other one you can see varios thumbails wirh colors, and you can choose and apply zoom FX for example:
http://multisononline.com/yamaha-sv-353
More options and the solution here with an incredible service and quick installation, you only have to search in google: product attribute picture dot com
Thanks to Nick :clap:
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
ppsoyal
I'm assuming that you are, and can remedy the fact that no price, or a zero price displays with the default attribute selected? Also, did you use the trial serial first and then pay for it? I noticed one of your post' very early on in this thread, and visited your site to see that you had abandoned the DPU because of the conflict. I'm glad to see that you finally found a solution after such a long wait. I'd like to hear more about your experience with this add-on, because I would like to start using it this weekend. After I've used it and can confidently recommend it, I will spread the news as much as I can.
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
WillyWanka666
I'm assuming that you are, and can remedy the fact that no price, or a zero price displays with the default attribute selected? Also, did you use the trial serial first and then pay for it? I noticed one of your post' very early on in this thread, and visited your site to see that you had abandoned the DPU because of the conflict. I'm glad to see that you finally found a solution after such a long wait. I'd like to hear more about your experience with this add-on, because I would like to start using it this weekend. After I've used it and can confidently recommend it, I will spread the news as much as I can.
So, I visited you site and see that you've fixed the default attribute price shown. So thanks for answering my question, kind of. :rolleyes:
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
ppsoyal
MAKE SURE YOU VOICE YOU NEEDS TO NICK BEFORE YOU BUY! You may end up paying much more than you anticipated. :frusty:
-
Re: Dynamic Price Updater
Hi
It might be nice to throw the code over so I can incorporate it and the download remains in one place. I've not had the time I thought I would this week (damn recession :frusty:) but I am still working on fixes
Cheers
Dan
-
Re: Dynamic Price Updater
Hi,
My problem relates to a Lightbox conflict with DPUv2.
v1 worked fine with the Lightbox fix and the radio button fix (+0.0001), but I would rather use v2 to avoid having +£0.00 displayed next to the default attribute.
In v2 symptons are: constant ajax-loader.gif displayed and no change to price on selection of alternative attribute i.e. DPU not working. However disable Lightbox and all's fine - everything works.
I see from posts that Lightbox should no longer cause a problem in v2 so I assume there must be an additional conflict elsewhere.
I have the CEON mapping /dpu_ajax.php exclusion in place and working, run Zencart v1.38a and have a fair number of other mods.
I have set up one product as an example: here
If a more knowledgeable Zenner has any ideas that would be great.
Cheers
Simon
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
Chrome
Hi
It might be nice to throw the code over so I can incorporate it and the download remains in one place. I've not had the time I thought I would this week (damn recession :frusty:) but I am still working on fixes
Cheers
Dan
Too little, too late. 3yrs should have been adequate. If I had only noticed this when I made my first post, I wouldn't have wasted a month's time. :frusty:
-
Re: Dynamic Price Updater
Just ran into an issue that was really annoying, hopefully Chrome can explain why it was there?
There was a second price being displayed on the page, completely out of place. For whatever reason, another price was being added to "cartAdd" (var _secondPrice in jscript_ajax_updater.php). There was no define() to turn this off!
I set _secondPrice = '' and it went away.
-
Re: Dynamic Price Updater
Hi all
Simon: Did you see the link for the updated DPU currently in test which I hope fixes this issue? If not I'll repost it for you
Willy: Too little too late? This is *free* software that took a damn long time to write. Time that I could've spent, oh I don't know, making money? I don't want to sound too narky but a little respect, maybe?
Bob: In the readme it does say to set _secondPrice to false (without the quotes) to prevent it from displaying. The alternative is to set it to the name of the element you would like the price to appear before (this was created for pages that were quite lengthy so users didn't have to scroll back to the top of the page to see the updated price). There isn't a define() for it because basically it's a holdover from v1
At this current moment I'm working 3 separate jobs to try and stay afloat and my work for DPU (and, yes, I do realise that I have been lax) has had to take a back seat. I apologise for this but a little support would be greatly appreciated. If I were to be charging for the software I'd take the heat with good aplomb but I'm not and I don't want to but i do have to eat and pay my rent
Sorry for the minor rant
Dan
-
Re: Dynamic Price Updater
Dan, I'm subscribed to the thread from a while ago, I have used it on both of my Zen sites to date. Let me just say I think it is a fantastic contribution, one that in all honesty I'd put right at the top of the list to be incorporated into Zen's core.
You need not explain yourself on here. Free software created by the hard work of people out of the goodness of their heart needs no apologies for any reason.
If there are problems then people need to find workarounds or find a solution and post it to benefit the community. Anyhow - Thanks.
:smile:
-
Re: Dynamic Price Updater
Hi Steve
Thanks for the encouragement! I only created DPU to give back to the community but it is nice to know that's it's appreciated
Dan
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
stiggy100
Dan, I'm subscribed to the thread from a while ago, I have used it on both of my Zen sites to date. Let me just say I think it is a fantastic contribution, one that in all honesty I'd put right at the top of the list to be incorporated into Zen's core.
You need not explain yourself on here. Free software created by the hard work of people out of the goodness of their heart needs no apologies for any reason.
If there are problems then people need to find workarounds or find a solution and post it to benefit the community. Anyhow - Thanks.
:smile:
I totally agree with stiggy100. You need not to be concerned with those that do not know how to appreciate a FREE contribution and yet have the audacity to criticize not only the contribution but also the developer that decides to share it with the community. I think your contribution is a great asset not only for those that manage to put it to some use but also for those of us that can benefit by learning from it.
---------------------------
I apologize before hand for somewhat going off the subject with my question. We have been working with several ajax applications that for the most part work as expected. I can add products to the shopping cart and make changes to it without reloading the page. I would like to know how could I add a code that would actually "update" the shopping cart contents on the page being displayed i.e. either on the shopping cart sidebox or next to the shopping cart link on the top menu.
In a sense, I guess I'm looking at a Dynamic "Shopping Cart Totals" Updater.
Thank you much for your time, your efforts and your add-on.
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
Chrome
Hi all
Simon: Did you see the link for the updated DPU currently in test which I hope fixes this issue? If not I'll repost it for you
Willy: Too little too late? This is *free* software that took a damn long time to write. Time that I could've spent, oh I don't know, making money? I don't want to sound too narky but a little respect, maybe?
Bob: In the readme it does say to set _secondPrice to false (without the quotes) to prevent it from displaying. The alternative is to set it to the name of the element you would like the price to appear before (this was created for pages that were quite lengthy so users didn't have to scroll back to the top of the page to see the updated price). There isn't a define() for it because basically it's a holdover from v1
At this current moment I'm working 3 separate jobs to try and stay afloat and my work for DPU (and, yes, I do realise that I have been lax) has had to take a back seat. I apologise for this but a little support would be greatly appreciated. If I were to be charging for the software I'd take the heat with good aplomb but I'm not and I don't want to but i do have to eat and pay my rent
Sorry for the minor rant
Dan
LOL! Time is not free.
-
Re: Dynamic Price Updater
Willy,
Have you noticed you are the only one complaining. Perhaps because it is seen by most on here as extremely poor form.
May I suggest you take the lesson learned from this and research an addon more thoroughly in future, that is if I'm brutally honest your shortfall not the issue of the developer.
Anyhow I fear I am becoming childish and not benefiting the community continuing this, so this is my last post regarding the subject.
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
WillyWanka666
Please don't apologize. All your hard work is greatly appreciated. I just sent you an e-mail to my site per request. Thanks again and I hope to hear from you soon. :lookaroun
I think I've been a little misunderstood. I am extremely grateful for all the hard work you've done with the DPU. The DPU is fantastic for what it is, it just didn't fit my needs. The solution I used to accomplish my immediate goals was the product attributes pictures module. Please take note of the customization page and communicate your needs with Nick and he'll be happy to help. I got everything I wanted and then some. I'm very happy with the results. It seems that I've unintentionally crossed some lines here so this will be my last post in this thread. Once again thank you chrome for all your hard work.
-
Re: Dynamic Price Updater
Hi all
Firstly thanks all for the continued support :smile:
The problem with forums and email etc. is that it's very difficult to convey context and inflections... It makes it all too easy to misinterpret meanings (as I've found out many times with sarcasm and irony; it can be taken the wrong way)
Sorry for misinterpreting your meanings, Willy... I've been under a lot of pressure and it's getting to me that I can't spend as much time as I'd like with DPU... After reading what I thought was a dig it did annoy me but I should've asked for a clarification on your comments rather than just retaliating... For that I apologise
Anyway, it's done now and I've learned yet another lesson about the web
Cheers
Dan
-
Re: Dynamic Price Updater
I was wondering about the url address... when viewing who's online the address shows as ..../dpu_ajax.php when I am in the store but in the browser window from the store it shows correctly... how does seo stuff read the address and does having this plugin affect what is indexed fro mGoogle and such?
-
Re: Dynamic Price Updater
Hi
DPU doesn't affect SEO or the search spiders at all
The reason you see dpu_ajax.php in who's online is that when DPU updates it causes the browser to request the PHP file that works out the new price. The user will just see the normal URL in the browser (spiders largely ignore JS) but the server will register that the browser has requested the Ajax handler. Any time you see a visitor to dpu_ajax.php it means they are on a product page :smile:
HTH
Dan
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
Chrome
Hi all
Simon: Did you see the link for the updated DPU currently in test which I hope fixes this issue? If not I'll repost it for you
Willy: Too little too late? This is *free* software that took a damn long time to write. Time that I could've spent, oh I don't know, making money? I don't want to sound too narky but a little respect, maybe?
Bob: In the readme it does say to set _secondPrice to false (without the quotes) to prevent it from displaying. The alternative is to set it to the name of the element you would like the price to appear before (this was created for pages that were quite lengthy so users didn't have to scroll back to the top of the page to see the updated price). There isn't a define() for it because basically it's a holdover from v1
At this current moment I'm working 3 separate jobs to try and stay afloat and my work for DPU (and, yes, I do realise that I have been lax) has had to take a back seat. I apologise for this but a little support would be greatly appreciated. If I were to be charging for the software I'd take the heat with good aplomb but I'm not and I don't want to but i do have to eat and pay my rent
Sorry for the minor rant
Dan
Dan,
Just tried your fix on a test site and it works fine.
Thank you very much
(I hadn't bothered with it before as I am not using mootools, however it works none the less)
Simon