Zen Cart Logo
Forums / All Other Contributions/Addons / Dynamic Price Updater

Dynamic Price Updater

Views: 342,231

Results 141 to 160 of 1,701
07 Jan 2008, 09:26
#141
webschnecke avatar

webschnecke

New Zenner

Join Date:
Apr 2006
Posts:
15
Plugin Contributions:
0

Dynamic Price Updater

Hi @ all.

This module is fantastic! THANKS a lott.

There are some questions.

1.)
Is it possible to use more languages than english? How can I implement language files???
There are two translations at the beginning "define..... Price Breaktdown AND Your Price:" but there is another word to trancelate "Product price". Where is it???

2.)
I need the current weight (in kg) next to the price. How can I add this information into the box?

3.)
Is it possible to set a limit for the weight?
Example:
Every product can be advanced with attributes. Every attribute has a spezial weight. The customer can choose so many attributes he wants, but there must be a limit in the weight. The limit should be 900g (0,9kg). Than the customer should get a massage "Sorry you have reach the limit of attributes", or something else...

This is very important for us, is it possible?

4.)
Is there an option to set the box allways on? At the moment the box is on If I choose an attribute. Is there no attribute activated I cant see the box.
That would be nice.

Thanks for your help.

Greetz
Webschnecke

08 Jan 2008, 12:06
#142
webschnecke avatar

webschnecke

New Zenner

Join Date:
Apr 2006
Posts:
15
Plugin Contributions:
0

Re: Dynamic Price Updater

Ive found something by my self...

AT LINE: 359 & 360

	hText += 'Product price - ' + (showQuantitySB ? quantity + 'x ' : '') + l + addCommas(origPrice.toFixed(2)) + r + '<br/>';
	newText += '<hr />Total: ' + l + addCommas((totalAdj * quantity).toFixed(2)) + r;

REPLACE WITH:

hText += '<?php echo UPDATER_BASIS; ?>' + (showQuantitySB ? quantity + 'x ' : '') + l + addCommas(origPrice.toFixed(2)) + r + '<br/>';
	newText += '<hr /><?php echo UPDATER_TOTAL; ?>' + l + addCommas((totalAdj * quantity).toFixed(2)) + r;

AND AT THE BEGINNING: LINE 11
define('UPDATER_PREFIX_TEXT', 'aktueller Preis: ');
define('UPDATER_SB_TITLE', 'Dein Mix'); // the heading that shows in the Updater sidebox
define('UPDATER_BASIS', 'Basis: '); //LINE 361
define('UPDATER_TOTAL', 'Summe: '); //LINE 362

Greetz
Webschnecke

09 Jan 2008, 12:23
#143
webschnecke avatar

webschnecke

New Zenner

Join Date:
Apr 2006
Posts:
15
Plugin Contributions:
0

Re: Dynamic Price Updater

Is me... Hi

Ive got a Problem.
You see the copy of a product. At first two different attributes with checkboxes, than follows the debug, at at the end there ist the last attribute. But the last is under the "Onload: --- End of loading procedures ---"

This is a problem... the updater only use the two attributes at the beginning.
What is wrong?

[ ]=Checkbox

Headline, lorem ipsum....
[ ] Früchte
[ ] Annanas (+€0.54) (+0.9kg)
[ ] Banane (+€0.54) (+0.9kg)

Headline, lorem ipsum....
[ ] Nüsse & Kerne
[ ] Haselnuss (+€1.28) (+5kg)
[ ] Sonnenblumenkerne (+€1.77) (+0.1kg)
[ ] Wallnüsse (+€3.21) (+0.01kg)

###############################################
Debug messages
SP Onload: Type: always
updSP: Price node cloned!
updSP: Node inserted successfully
updSP: Duplicating price, by jove!
Onload quantity: Cart add INPUT discovered (1)
Onload base price: Price found: 3.75
Onload RAD/CH: Price found: 3.75
Onload RAD/CH: Price found: 3.75
Onload RAD/CH: Price found: 3.75
Onload RAD/CH: Name - id[4][7] : ID - attrib-4-7 : Adjusted!
Onload RAD/CH: Name - id[4][6] : ID - attrib-4-6 : Adjusted!
Onload RAD/CH: Name - id[6][11] : ID - attrib-6-11 : Adjusted!
Onload RAD/CH: Name - id[6][12] : ID - attrib-6-12 : Adjusted!
Onload RAD/CH: Name - id[6][13] : ID - attrib-6-13 : Adjusted!
Onload RAD/CH:
Onload RAD/CH:
Onload RAD/CH:
Onload RAD/CH: Name - id[4][7] : ID - attrib-4-7 : Adjusted!
Onload RAD/CH: Name - id[4][6] : ID - attrib-4-6 : Adjusted!
Onload RAD/CH: Name - id[6][11] : ID - attrib-6-11 : Adjusted!
Onload RAD/CH: Name - id[6][12] : ID - attrib-6-12 : Adjusted!
Onload RAD/CH: Name - id[6][13] : ID - attrib-6-13 : Adjusted!
Onload: --- End of loading procedures ---
###############################################

Headline, lorem ipsum....
[ ] Aubergine (+€1.61) (+1kg)
[ ] Gurke (+€0.59) (+0.03kg)
[ ] Möhre (+€1.61) (+1kg)

Greetz
Webschnecke

09 Jan 2008, 18:14
#144
dalopey avatar

dalopey

New Zenner

Join Date:
Dec 2007
Location:
Atlanta, GA
Posts:
62
Plugin Contributions:
0

Re: Dynamic Price Updater

hey - don't know if this has been noticed yet or not (I'm still reading the whole thread!!!)

http://chrome.me.uk/shopdev/index.php?main_page=product_info&products_id=3

Using your test site - this particular item was on sale... changing the number of items only changes the original price, not the sale price...

just a FYI - I still plan to install it!

edit:

Ahhh - but it does go into the shopping cart with the correct price... nice - still usable.

10 Jan 2008, 03:41
#145
dalopey avatar

dalopey

New Zenner

Join Date:
Dec 2007
Location:
Atlanta, GA
Posts:
62
Plugin Contributions:
0

Re: Dynamic Price Updater

OK - that was painless enough!!

I did have to make the Lightbox fix... then it started working...

I'm going to play with it more tomorrow...

Other ideas:

Don't let user choose more than your quantity on hand

Fix the problem with the sale price I saw earlier today

Would like to keep the Single Unit Price visible while calculations display somewhere else (formatting I can copy code from New Products page or something)

sure would be cool to have this same function on the Shopping Cart Page.
(on my site, most items will be sold in quatities more than one (fabric by the yard) - this way you can change quantities after "collecting" all the pieces you want...

for that matter, same as that - have it work on any page that shows multiple product listings... like New Products. ( but I also want "Add" buttons next to each product, instead of the one on top "add selected products to cart" - I don't think it very intuitive... IMO

I will probably play with that and see if I can help! (after I figure out another problem I have!! - a DOM event problem i have with my tree menu and lightbox)

:)

Thanks for a great function!!! I wanted something like this and I'm glad someone already went through the effort!!

16 Jan 2008, 19:00
#146
dalopey avatar

dalopey

New Zenner

Join Date:
Dec 2007
Location:
Atlanta, GA
Posts:
62
Plugin Contributions:
0

Re: Dynamic Price Updater

So any thoughts on how to modify the look and feel of this?

I want to move where it displays... Like inside the cartAdd DIV

I don't want the actual price (inside the productPrices DIV) to change - just the one inside/next to the cartAdd DIV...

I've been able to move the Price Breakout to the main window, rather than a sidebox... I will change it's STYLEs by creating my own, or not haveing it at all if I modify that whole way it looks... especial if I also put the breakout in the cartAdd DIV as well...

Is there a way to "modularize" it? That would be kool... then we could put different "elements" wherever we want in our code...

And please take no OFFENSE to anything I'm saying here. I mean none. I think this is a great tool and I will be using it in my site.

17 Jan 2008, 16:14
#147
dalopey avatar

dalopey

New Zenner

Join Date:
Dec 2007
Location:
Atlanta, GA
Posts:
62
Plugin Contributions:
0

Re: Dynamic Price Updater

well aren't i full of ideas??

is it possible, when time permits of course, to make a scaled back version of this tool?

what I mean is to not have any of the code generate all the DEBUG information... provide this version with the assumption that the code works as you like it to. But also distribute the debug version which would be developed in parallel to the "production" version, for when its needed.

That only reason for my request is because the resultant SOURCE code for a given page on my site is about 16 pages long, and a lot of it is this debug information (which I turned off in the JS) I don't want all that info visible to anyone who does a "View Source"

Thanks - again - in advance...

17 Jan 2008, 20:01
#148
dalopey avatar

dalopey

New Zenner

Join Date:
Dec 2007
Location:
Atlanta, GA
Posts:
62
Plugin Contributions:
0

Re: Dynamic Price Updater

FYI

You can put the "Price Breakdown" anywhere you want: I put it above my review button:

var _sidebox = 'productReviewLink';

what I really want to do is put it INSIDE my cartAdd box!!

17 Jan 2008, 22:54
#149
dalopey avatar

dalopey

New Zenner

Join Date:
Dec 2007
Location:
Atlanta, GA
Posts:
62
Plugin Contributions:
0

Re: Dynamic Price Updater

Eeek... its in a "few" places...

./includes/modules/pages/product_reviews_write/jscript_slimbox.php
./includes/modules/pages/product_music_info/jscript_slimbox.php
./includes/modules/pages/document_product_info/jscript_slimbox.php
./includes/modules/pages/product_reviews/jscript_slimbox.php
./includes/modules/pages/document_general_info/jscript_slimbox.php
./includes/modules/pages/product_reviews_info/jscript_slimbox.php
./includes/modules/pages/product_free_shipping_info/jscript_slimbox.php

Maybe an link (or a shortcut for you M$soft folks) would have been good here... just a thought... it would certainly make it footprint smaller... (will ZIP copy them as links, or follow them?) You could use TAR and gzip...

Have one file and then all these would just "point/link" to it...

For my solution, though, its a little more hairy... I would have to put the snippet into each of these TPL files... that would actually suck

18 Jan 2008, 00:00
#150
dalopey avatar

dalopey

New Zenner

Join Date:
Dec 2007
Location:
Atlanta, GA
Posts:
62
Plugin Contributions:
0

Re: Dynamic Price Updater

Oops - I put that in the WRONG thread - I'm multitasking - sorry guys.

Maybe someone can delete This and My last post - please??!! :)

18 Jan 2008, 00:02
#151
dalopey avatar

dalopey

New Zenner

Join Date:
Dec 2007
Location:
Atlanta, GA
Posts:
62
Plugin Contributions:
0

Re: Dynamic Price Updater

OK - I got the idea of placing the updated price info somewhere...

but it required me to put DIV's inside the cartAdd DIV...

in file tpl_product_info_display.php (make a copy of it in your own template area)

like this:

<?php $display_qty = **'<div id="PriceUpdate">' . **(($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['produ cts_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : ''); if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) { // hide the quantity box and default to 1 $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_G ET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IMAGE_IN_CART_HOVER, BUTTON_IN_CART_ALT); } else { // show the quantity box $the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products _id'])) . '" maxlength="6" size="4" />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '**</div>**' . zen_dr aw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IMAGE_IN_CART_HOVER, BUTTO N_IN_CART_ALT); } $display_button = zen_get_buy_now_button($_GET['products_id'], $the_button); ?> <?php if ($display_qty != '' or $display_button != '') { ?>
<div id="cartAdd">
<?php
  echo $display_qty;
  echo $display_button;
      ?>
       </div>
18 Jan 2008, 00:16
#152
dalopey avatar

dalopey

New Zenner

Join Date:
Dec 2007
Location:
Atlanta, GA
Posts:
62
Plugin Contributions:
0

Re: Dynamic Price Updater

If anyone wants to check out some of my progress - it's TOTALLY in beta right now... graphics will all come later!!!

https://www.whereisellstuff.com

try adding something to your cart! I have a little nifty...

Eventually I want to make a "sliding" cart, that kinda comes out of the top of the page or somewhere...

18 Jan 2008, 23:03
#153
batman36 avatar

batman36

New Zenner

Join Date:
Jan 2008
Location:
Herkimer, New York, United States
Posts:
25
Plugin Contributions:
0

Re: Dynamic Price Updater

How do I get it to understand qty discounts.. it only reads the base price, if a customer adds 25 pieces it still syas they are 20.00 each instead of 15.00 each, yet when you add ot cart the right price is included there.

thanks
wayne

21 Jan 2008, 21:11
#154
jensderknipser avatar

jensderknipser

New Zenner

Join Date:
Mar 2006
Location:
munich
Posts:
34
Plugin Contributions:
0

Re: Dynamic Price Updater

Hi all,

first thanks for this wonderful concept. My products are mostly attribute-priced, so this is exactly what I am looking for. Some concerns although:
1.: I get it to work only with dropdown-menues, never with radio-buttons (???)

2.: The Prices read like "undefined22.00undefined" instead of a currency-symbol, what I would expect here???

I have adjusted everything like shown in the post#144 in this thread, but ... ???

Maybe, someone of you guys gan show me the way?
Thanks in advance,
jens

30 Jan 2008, 17:34
#155
bobio avatar

bobio

New Zenner

Join Date:
Dec 2007
Posts:
27
Plugin Contributions:
0

Re: Dynamic Price Updater

anyone know why my product page is showing "your price:" twice, I have exhaused my attempts to remove one or the other. I noticed when I edit the tpl_product_info_display.php file, I move the <add to cart box> section and one of my YOUR PRICE follows that one. and if I move <product price block> one YOUR PRICE follows that one, but if I remove this section of the script BOTH disappear. I am stumped.

30 Jan 2008, 18:09
#156
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Dynamic Price Updater

bobio:

anyone know why my product page is showing "your price:" twice, I have exhaused my attempts to remove one or the other. I noticed when I edit the tpl_product_info_display.php file, I move the <add to cart box> section and one of my YOUR PRICE follows that one. and if I move <product price block> one YOUR PRICE follows that one, but if I remove this section of the script BOTH disappear. I am stumped.

open the updater javascript file, at line 32 set this statement to false:

var _secondPrice = 'false'; 

you can also choose to not display the sidebox with the price breakdown, or move it to another location. Look through the first 37 lines to see that variables that can be changed.

30 Jan 2008, 18:33
#157
bobio avatar

bobio

New Zenner

Join Date:
Dec 2007
Posts:
27
Plugin Contributions:
0

Re: Dynamic Price Updater

Thanks for everything, you are terrific.

03 Feb 2008, 04:35
#158
jtjohnston avatar

jtjohnston

New Zenner

Join Date:
Mar 2007
Posts:
73
Plugin Contributions:
0

Re: Dynamic Price Updater

:oops:> Chrome:

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 I think radio boxes work?

The debug script was a surprise. I'll leave it on for now.

if "Product Priced by Attributes:" = true
{
it counts shipping twice; Shipping was already calculated by Zencart because its radiobox was already the
"*Display price will include lowest group attributes prices plus price"
http://quebecinter.net/regaliax/index.php?main_page=product_info&cPath=2&products_id=3
}else{
it displays a total of attributes and ignores the Zencart calculated price
http://quebecinter.net/regaliax/index.php?main_page=product_info&cPath=2&products_id=11
}

I have no shipping module installed, in fact. I'm being obstinate about doing this, until I get a coder to make me one.

12 Feb 2008, 15:50
#159
dynamixlabs avatar

dynamixlabs

New Zenner

Join Date:
Feb 2008
Location:
Atlanta, GA
Posts:
1
Plugin Contributions:
0

Re: Dynamic Price Updater

Hey Guys! Great contribution. For those who are interested, I have found a way to solve the issue whereby the site was only referring to the original price, and not the sales price of a product. The way I did it (and there may very well be a better way) was to navigate to includes/functions/functions_prices.php and find this:

if ($display_special_price) {
      $show_normal_price = '<span class="normalprice">' . $currencies->display_price($display_normal_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . ' </span>';

I replaced that with this:

if ($display_special_price) {
      $show_normal_price = '';

Which removed the original pricing altogether, and lets the javascript target the sales price instead. Next, I navigated to where the special pricing was being called:

} else {
          $show_special_price = ' ' . '<span class="productSpecialPrice">' . $currencies->display_price($display_special_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '</span>';

And I replaced that with this:

} else {
          $show_special_price = ' ' . '<span class="productSpecialPrice">' . $currencies->display_price($display_special_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '</span><br />Original Price: <span class="normalprice">' . $currencies->display_price($display_normal_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . ' </span>';

What this is doing is moving the original price down a line below the sales price, so that the resulting cart output looks like this:

Starting at: $199.95
Original Price: $220.00
Save: 9% off

As opposed to:
Starting at: $199.95 (the price to the left has a strikethrough) $220.00
Save: 9% off

Now, you will probably want to tweak the look of the special pricing and original price in your stylesheet, but otherwise this method should work well if you have applied a sale price to your product. There are a few other areas that I didn't touch because I don't need them for my application, such as product_is_free, but you should be able to modify those in the same fashion to achieve the desired result. Let me know how this works for you! Again, thanks for the attribute pricing contribution.

26 Feb 2008, 00:52
#160
oneworldstudios avatar

oneworldstudios

New Zenner

Join Date:
May 2007
Posts:
47
Plugin Contributions:
0

Re: Dynamic Price Updater

jensderknipser:

2.: The Prices read like "undefined22.00undefined" instead of a currency-symbol, what I would expect here???

Hey Guys, cool mod...

  1. I'm having exactly the same problem, my price comes up with "undefined" on either side of the price instead of I'm guessing a dollar sign to the left.

  2. Also, when someone selects a "2XL" shirt or the like, the price adds $1.99 as it's supposed to, but if they then go back and select "small" as an option the price does not go back to normal, i.e. the higher price remains there. Any idea how to make this work properly?

Thanks!

Example here: http://www.choppertown.net/store/index.php?main_page=product_info&cPath=66&products_id=185