Re: Dynamic Price Updater
Hi all
Sorry it's taken me so long to reply... That old enemy, time, has not been on my side... I have been following the trouble people are experiencing with the display price and believe me I really want to get it sorted... I know I've said this before but I intend to try and fix the problems this week
Frans, I have done some work integrating with the dual pricing mod but it statically returns the display string rather than calculated results so I've been trying to strip them down to something I can work with... I don't want to alter the dual pricing mod's code... I'll get it sorted
kamelion0927, the Updater doesn't pull its prices from anywhere: it calculates them by creating a sandboxed shopping cart object and applying the attributes to it... Heavy-lifting of the price calculations is offloaded to core routines to future-proof against core updates and updated pricing routines... Unfortunately, it appears I'm applying something incorrectly... I need to look into it
Incidentally, have you tried echoing the $pibp var to see what it contains?
Dan
Re: Dynamic Price Updater
Quote:
Originally Posted by
Chrome
kamelion0927, the Updater doesn't pull its prices from anywhere: it calculates them by creating a sandboxed shopping cart object and applying the attributes to it... Heavy-lifting of the price calculations is offloaded to core routines to future-proof against core updates and updated pricing routines... Unfortunately, it appears I'm applying something incorrectly... I need to look into it
Incidentally, have you tried echoing the $pibp var to see what it contains?
Dan
Sorry - I'm not talented enough to be a true coder so I always forget to utilize the echo statement :D (which, incidentally, would save me a lot of time trying to figure out what parts of the code to use on if statements - time for a sticky on the monitor).
Thanks for your time! I'll try echoing the statement and see what I get.
Re: Dynamic Price Updater
Quote:
Originally Posted by
kamelion0927
Sorry - I'm not talented enough to be a true coder so I always forget to utilize the echo statement :D (which, incidentally, would save me a lot of time trying to figure out what parts of the code to use on if statements - time for a sticky on the monitor).
Thanks for your time! I'll try echoing the statement and see what I get.
Hi
The little piece of code that I always use is
PHP Code:
echo '<pre>';
var_dump($theVarWithNoName);
echo '</pre>';
var_dump() is great because it gives you extended information... Also the variable can be an array, object or pretty much anything really... The <pre> tag makes it nice and readable :smile:
HTH
Dan
Re: Dynamic Price Updater
Quote:
Originally Posted by
Chrome
Hi
The little piece of code that I always use is
PHP Code:
echo '<pre>';
var_dump($theVarWithNoName);
echo '</pre>';
var_dump() is great because it gives you extended information... Also the variable can be an array, object or pretty much anything really... The <pre> tag makes it nice and readable :smile:
HTH
Dan
LOL thanks but you almost totally lost me - you have to type slowly and clearly so I can keep up. :D
I added
PHP Code:
$pibp = zen_get_products_base_price($pid);
echo '<pre>';
var_dump($pibp);
echo '</pre>';
to jscript_ajax_updater right under
PHP Code:
$pidp = zen_get_products_display_price($pid);
if (empty($pidp)) $load = false;
and above
but nothing is showing on my product info pages. Am I putting the code in incorrectly?
Re: Dynamic Price Updater
Hi
Crikey, you're right, it's in a javascript file... You should be able to see the results in the source of page, near the top... The echo option would have the same effect... Change the code to:
PHP Code:
echo '// DEBUG';
var_dump($pibp);
Refresh the page, view source then hit CTRL+F and search for DEBUG... Convoluted but it should get you to your data
HTH
Dan
Re: Dynamic Price Updater
Hi could some one let me know how I stop the price displaying twice with this excellent mod. thanks,
Re: Dynamic Price Updater
Quote:
Originally Posted by
maxell6230
Hi could some one let me know how I stop the price displaying twice with this excellent mod. thanks,
try this, open jscript_updater.php and find (line 35):
var _secondPrice = 'true';
and change to:
var _secondPrice = 'false';
Re: Dynamic Price Updater
ok thanks Hari changed it and it worked, although mine said var _secondPrice = 'cartAdd'; whioch I changed to false, does this make a differance?
Thanks,
Re: Dynamic Price Updater
Quote:
Originally Posted by
maxell6230
ok thanks Hari changed it and it worked, although mine said var _secondPrice = 'cartAdd'; whioch I changed to false, does this make a differance?
Thanks,
Yep, "cartadd" was correct value for that. Good that it worked for you!
Re: Dynamic Price Updater
Hi All,
Thanks for taking the time to create this awesome module.
I have uploaded all files from the zip to a website im working on. However, after the upload, I recieve an error in google chrome:
"Status returned - "
On IE, I get a constant loading picture.. circle just keeps circling..
Any ideas on how to fix the issue?
Thanks,
Lee