1 Attachment(s)
Re: Dynamic Price Updater
Having had a look around, I think I've found the answer to option #2
In the attributes controller, under Price and Weight, there are 2 INPUT fields that allow you to control the price... One of these boxes (the one on the left) contains a + symbol... deleting that on your attributes should, I think, have the desired effect
I've attached a little image to the post so you can see where I'm talking about :smile:
Hope that works... Let me know :smile:
Dan
Re: Dynamic Price Updater
Well, I think you have done it! Take a look at http://www.printsxpress.com/index.ph...&products_id=1
I turned OFF all of the + signs at appropriate attributes. However, I left a plus sign on the attribute for Sawtooth Hanger since I do want that to add on a cost of $4.00
Finally, I made 8"x10" attribute the "default" selection.
There we have it.
So far so good and I can't thank you enough.
I'll let you know if I come accross anything else like this. Is 1.3.8 coming soon? I hear it is basically bug fixes.
Re: Dynamic Price Updater
I'm glad that worked :smile:... it was an education for me as well
I don't know the release date of 1.3.8 I'm afraid... But I think you're right and it's mostly bugfixes
One of the bugs that is due to be fixed relates to attributes that use textareas (IIRC), which prompted me to hang fire with true code updates (it is the plan that the Updater will work with any and all attributes)
Let me know if you do have any more trouble... I know the Updater can be a bit quirky so I'll support it as best I can
Dan
Re: Dynamic Price Updater
I'm having problems getting this to work. I keep getting errors when selecting a radio button, it says "undefined(price)undefined(quanitity)" and the sidebox says chrome has broken something. I am running this on a xampp test server on my local computer so you can't see what's going on. I enabled debug and here's what it says:
Code:
Onload quantity: Cart add INPUT discovered (1)
Onload base price: Price found: 12.5
Onload RAD/CH: Price found: 12.5
Onload RAD/CH: Price found: 12.5
Onload RAD/CH: Price found: 12.5
Onload RAD/CH: Name - id[1] : ID - attrib-1-1
Onload RAD/CH: Name - id[1] : ID - attrib-1-2 : Adjusted!
Onload RAD/CH: Name - id[1] : ID - attrib-1-3 : Adjusted!
Onload RAD/CH:
Onload RAD/CH:
Onload RAD/CH:
Onload RAD/CH: Name - id[1] : ID - attrib-1-1
Onload RAD/CH: Name - id[1] : ID - attrib-1-2 : Adjusted!
Onload RAD/CH: Name - id[1] : ID - attrib-1-3 : Adjusted!
Onload: --- End of loading procedures ---
updateR: *Adj* - Radio - Name: id[1] - Price adjust: 17.5 - Mode:
updatePriceNow: Item: brass - Mode: Base - Altering base to 17.5
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
createSB: Sidebox created!
This happens with both IE7 and the latest version of FireFox. It seems as if there is something funny going on with my local computer because I have a problem with the jscript in xsell advanced, too. When I loaded xsell advanced and price updater onto the live remote server the js works for both mods in both browsers.
Do you have any ideas as to why it doesn't work on my localhost? I have FF configured with javascript enabled, I couldn't see where to enable it in IE7.
Another thing about Price Updater, with radio buttons at least, when you select an attribute and it updates the price and then you change it to a different attribute it sometimes sticks and the price won't change. Any ideas as to why this is happening?
I love the concept of this mod, it's super slick, so I hope that you will continue developing it. I am really impressed by your ability to create this and I hope that after a few years of self-taught nightschool I too will be able to code such innovative ideas.:smile:
Matt
Re: Dynamic Price Updater
Hi Matt
Thanks for the great compliment :smile:
I've got to hand it to you though, you've found a fault I have no explanation for
I know things can be a little bit weird running a local server (I run WAMPServer) but in I think honesty JS should be platform agnostic... There may be an issue in how the files are served up (maybe a headers problem... not too great with server stuff)
Does other JS run ok when served up locally?
Let me know and I'll see if I can find any info that might help
The problem with the radio boxes is something I've noticed... The issue only arises when the users clicks back onto an attribute that doesn't have a price adjustment (i.e. doesn't adjust the price)... I'd forgotten about that but I'll get it fixed over the next few days
If I'm not mistaken the settings for JS in IE are under tools -> security -> custom level... Near the bottom of that option list (enabled by default)
Dan
Re: Dynamic Price Updater
Well both browsers have js enabled then...
I assume that Lightbox and Image Handler 2 both use jscript and they run fine. I am having a problem with Price Updater and Just Another Cross Sell Advanced. It seems like they are both having the same or similar problems - Price Updater says undefined around the price and X Sell says addfield is not defined. So they must both work in a similar function. I guess it's no big deal since this is just a test server but I'm one of those people that can't let an unresolved issue go. :D Like a dog with a bone I guess.:laugh:
Matt
Re: Dynamic Price Updater
Hey
Yeah, Lightbox does use JS but I don't know what it does (never checked it out)
It seems like it's a DOM (Document Object Model) issue... Strangely it resembles the situation that arises when using innerHTML but in this case I notice it's patchy
I know what you mean though: I hate unresolved issues too, even if they seem unimportant :smile:
If I do manage to find anything out I'll post it on here
On a purely "I'm being really pedantic" point, JScript is something a bit different... Back in the Bad Old Days(tm) of the browser wars, Netscape/Mozilla and MS had their own ideas for client-side scripting... MS created JScript and NS/Mozilla created ECMAScript... They're really similar and Javascript is an umbrella term... This is a very abridged description and I'm sure if it's inaccurate a fellow pedant will correct me :smile:
All learning is good learning :smile:
Dan
Re: Dynamic Price Updater
I have with 3 problems with this great mod - the first 2 can do nothing about but hopefully Dan can; the third I can offer guidance for:
1. Ignores quantity discounts and therefore shows the wrong total.
2. Ignores one-time charges.
3. A client pointed out that if the price is in its usual location (i.e. up at the top of the page with the product name) then quite often the Attributes and Add to Cart sections are below the fold, so the benefits of this super mod are lost.
My solution was to copy the section for the base price display (EXCLUDING the quantity discounts section) in tpl_product_info_display.php ...
Code:
<h2 id="productPrices" class="productGeneral">
<?php
// base price
if ($show_onetime_charges_description == 'true') {
$one_time = '<span >' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br />';
} else {
$one_time = '';
}
echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']);
?></h2>
and insert it closer to the Add to Cart box, giving this new element an id of productPrices2.
Then in jscript_updater.php, copy line 250 ...
Code:
document.getElementById('productPrices').innerHTML = '<?php echo UPDATER_PREFIX_TEXT; ?>' + l + addCommas(newPrice) + r + (showQuantity ? ' (' + quantity + ')' : '');
and paste it to the next line, changing productPrices to productPrices2.
You can then use css to position/style as you need.
Now what would be really neat (and I'm sure it can be done but I don't know how) is to hide this second display of the price until after a change has been made.
Because of the quantity discounts issue, I've had to remove it from the live site for now, but you can see the ide on the test site here
Re: Dynamic Price Updater
Hi
There is so much to Zen Cart it's difficult to remember it all lol... This mod has shown me just how flexible the system is
I need to do some research on the first 2 points but I'm sure I can sort it (at least, I hope I can lol)
The third point I'm aware of... Careful positioning of the sidebox can help with this but I'm also debating creating a 'floating' price container (like a detached sidebox) that will either stick in place when scrolling or can be dragged around
I do like the idea of the price at the bottom too... I think I'll steal the idea :D
I'll make an option to have it hidden until a change is made or to be always shown or not shown at all... I think that covers the bases :smile:
Thanks for the feedback and ideas... I'll post when an update is available... Probably over the next few days
Dan
Re: Dynamic Price Updater
Quote:
Originally Posted by
Chrome
I think I'll steal the idea :D
This isn't stealing! I WANTED you to have it...and make it work in that fashion. :thumbsup: