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:
Quote:
<?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>
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!!!
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...
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
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
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.
Re: Dynamic Price Updater
Quote:
Originally Posted by
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:
Code:
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.
Re: Dynamic Price Updater
Thanks for everything, you are terrific.
Re: Dynamic Price Updater
:oops:
Quote:
Originally Posted by
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/inde...&products_id=3
}else{
it displays a total of attributes and ignores the Zencart calculated price
http://quebecinter.net/regaliax/inde...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.
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:
Code:
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:
Code:
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:
Code:
} 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:
Code:
} 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.
Re: Dynamic Price Updater
Quote:
Originally Posted by
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/ind...roducts_id=185