Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Join Date
    Jan 2012
    Location
    London / Roma
    Posts
    30
    Plugin Contributions
    0

    help question How do I display the lowest price for a product when using Quantity Discounts?

    Hi, I have set up several products with quantity discounts applied. But in the product listing pages the price shown is the full price. For example,

    1 - 9 Cups = €2.50,
    10 - 49 Cups = €2.10,
    50 - 99 Cups = €2.00
    100+ = €1.90

    What I can't workout is how to show the lowest or 'from' price in the product listing.
    Am I missing something or a switch in the administrative side?

    Forgive my poor English, This is difficult for me to word and explain, grazie

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: How do I display the lowest price for a product when using Quantity Discounts?

    You can customize the module:
    /includes/modules/product_listing.php

    using your templates and overrides:
    /includes/modules/your_template_dir/product_listing.php

    with the code:
    Code:
            case 'PRODUCT_LIST_PRICE':
    
    // bof: display lowest quantity price
    //        $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
    $lowest_price = zen_get_products_discount_price_qty((int)$listing->fields['products_id'],20000);
    $lowest_price_tax_class = zen_products_lookup((int)$listing->fields['products_id'], 'products_tax_class_id');
    $lc_price = $currencies->display_price($lowest_price, zen_get_tax_rate($lowest_price_tax_class));
    // eof: display lowest quantity price
    
            $lc_align = 'right';
            $lc_text =  $lc_price;
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Jan 2012
    Location
    London / Roma
    Posts
    30
    Plugin Contributions
    0

    Default Re: How do I display the lowest price for a product when using Quantity Discounts?

    Hi, thank you very much.

  4. #4
    Join Date
    Jan 2012
    Location
    London / Roma
    Posts
    30
    Plugin Contributions
    0

    Default Re: How do I display the lowest price for a product when using Quantity Discounts?

    Hi, sorry to trouble you once again. I have noticed when I use your code to display the lowest €00.00 on the products listing page when I have my store set up as ' log on to access price ' it echos the price and not ' price unavailable '. Sorry. This is my error in not explaining how my store is set up, how can I show the lowest 'from' price in the product listing only when the customer is logged on?

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: How do I display the lowest price for a product when using Quantity Discounts?

    Have you an URL to your shop where we could perhaps peek at this?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: How do I display the lowest price for a product when using Quantity Discounts?

    Try this code:
    Code:
            case 'PRODUCT_LIST_PRICE':
            $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
    // bof: display lowest quantity price
    if ($lc_price == TEXT_LOGIN_FOR_PRICE_PRICE . '<br />' || $lc_price == TEXT_AUTHORIZATION_PENDING_PRICE . '<br />') {
      $change_price = false;
    } else {
      $change_price = true;
    }
    
    if ($change_price) {
      $lowest_price = zen_get_products_discount_price_qty((int)$listing->fields['products_id'],20000);
      $lowest_price_tax_class = zen_products_lookup((int)$listing->fields['products_id'], 'products_tax_class_id');
      $lc_price = $currencies->display_price($lowest_price, zen_get_tax_rate($lowest_price_tax_class));
    }
    // eof: display lowest quantity price
    
            $lc_align = 'right';
            $lc_text =  $lc_price;
    
            // more info in place of buy now
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7
    Join Date
    Jan 2012
    Location
    London / Roma
    Posts
    30
    Plugin Contributions
    0

    Default Re: How do I display the lowest price for a product when using Quantity Discounts?

    fantastico

  8. #8
    Join Date
    Jan 2012
    Location
    London / Roma
    Posts
    30
    Plugin Contributions
    0

    Default Re: How do I display the lowest price for a product when using Quantity Discounts?

    Very sorry for once more contacting you. I have 2 problems. I am trying to modify your script to show 'a partire dal' before the price where quantity discounts are used and not show 'a partire dal' where no quantity discounts are used. But I just break it. I also have a €00.00 price showing for products are 'Call for Price'.

    Can you help once more please? Very hard for newcomers but I am enjoying the learning.

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: How do I display the lowest price for a product when using Quantity Discounts?

    You could customize the code in your templates and overrides for:
    tpl_product_info_display.php

    on the line around 71:
    Code:
      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']);
    to add the code in RED:
    Code:
      echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . ($products_discount_type ? ' Discounts from: ' : '') . zen_get_products_display_price((int)$_GET['products_id']);
    and adjust as needed ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  10. #10
    Join Date
    Jan 2012
    Location
    London / Roma
    Posts
    30
    Plugin Contributions
    0

    Default Re: How do I display the lowest price for a product when using Quantity Discounts?

    Quote Originally Posted by Ajeh View Post
    You could customize the code in your templates and overrides for:
    tpl_product_info_display.php

    on the line around 71:
    Code:
      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']);
    to add the code in RED:
    Code:
      echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . ($products_discount_type ? ' Discounts from: ' : '') . zen_get_products_display_price((int)$_GET['products_id']);
    and adjust as needed ...
    Hi, no still lost. I have tried to show the lowest 'discounted_price' price in the place of the base price IF quantityDiscounts are given to that product, ELSE show the baseprice. Not yet knowledgeable of zen cart Cannot understand how to do it. Sorry.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v150 On Product Display Page add text before Price when using Qty Discount & change Price
    By rufusclc in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 4 Jun 2013, 08:04 PM
  2. Problem with the way the quantity discounts display on the product page
    By Kegless.co.uk in forum Setting Up Specials and SaleMaker
    Replies: 1
    Last Post: 7 May 2009, 12:24 AM
  3. Display Lowest Price in Product listing
    By gairneybank in forum Basic Configuration
    Replies: 6
    Last Post: 10 Sep 2006, 07:23 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR