Page 5 of 5 FirstFirst ... 345
Results 41 to 46 of 46
  1. #41
    Join Date
    Jun 2006
    Posts
    298
    Plugin Contributions
    0

    Default Re: Qty Discounts on Product Listing

    Would it be possible to hide the base price if I'm showing the quantity discount table?

    Click image for larger version. 

Name:	pumps.jpg 
Views:	68 
Size:	19.2 KB 
ID:	14196

  2. #42
    Join Date
    Feb 2010
    Location
    Syracuse, NY
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Qty Discounts on Product Listing

    What I'm using here is the same code offered by Ajah Post#31 except the Qty Discount Table is added to the price column instead of creating a new column so others are not confused.

    My code may look a little different for I use Flexible Product Listing.

    This is exactly what I have to produce the outcome you desire. We will have to change the original edits back.

    find:

    PHP Code:
     $lc_text .= '<table style="border:1px solid #E9E9E9" cellspacing="0" cellpadding="3">'
    change back to without using a combined operator (=):

    PHP Code:
    $lc_text '<table style="border:1px solid #E9E9E9" cellspacing="0" cellpadding="3">'
    add the else statement back but this time using a combined operator (.=)
    PHP Code:
     else {
      
    $lc_text .= '';
      } 
    Full code below:

    PHP Code:
      $products_discount_type zen_products_lookup($listing->fields['products_id'], $what_field 'products_discount_type');
      
    $columns ++;
      
    $products_id_current = (int)$listing->fields['products_id'];
      
    $quantityDiscounts = array();
      
    $products_discount_type_from zen_products_lookup($listing->fields['products_id'], $what_field 'products_discount_type_from');
      require(
    DIR_WS_MODULES zen_get_module_directory(FILENAME_PRODUCTS_QUANTITY_DISCOUNTS));

      for (
    $i=1$m=$products_discounts_query->RecordCount(); $i<=$m$i++) {
        
    $discount_level_n 'discount_level_' $i;
        $
    $discount_level_n $quantityDiscounts[$i-1];
      }

      if (
    $products_discount_type != 0) {

      
    $lc_text '<table style="border:1px solid #E9E9E9" cellspacing="0" cellpadding="3">';

      
    $lc_text .= '<tr style="background: #C0C0C0; font-weight: bold">';
      
    $lc_text .= '<td colspan="2" align="center">'TEXT_PL_QD_HEADING '</font></td>';
      
    $lc_text .= '</tr>';
      
    $lc_text .= '<tr style="background: #F5F5F5;">';
      
    $lc_text .= '<td>' TEXT_PL_QD_QTY '</td>';
      
    $lc_text .= '<td>' TEXT_PL_QD_PRICE '</td>';
      
    $lc_text .= '</tr>';
      
    $lc_text .= '<tr>';
      
    $lc_text .= '<td style="border-bottom:1px solid #F1F1F1;">' $show_qty '</td>';
      
    $lc_text .= '<td style="border-bottom:1px solid #F1F1F1;">' $currencies->display_price($show_pricezen_get_tax_rate($products_tax_class_id)) . '</td>';
      
    $lc_text .= '</tr>';
      
      for (
    $i=1$m=$products_discounts_query->RecordCount(); $i<=$m$i++) {
        
    $discount_level_n 'discount_level_' $i;

        
    $lc_text .= '<tr>';
        
    $lc_text .= '<td style="border-bottom:1px solid #F1F1F1;">' . ${$discount_level_n}['show_qty'] . '</td>';
        
    $lc_text .= '<td style="border-bottom:1px solid #F1F1F1;">' $currencies->display_price(${$discount_level_n}['discounted_price'], zen_get_tax_rate($products_tax_class_id)) . '</td>';
        
    $lc_text .= '</tr>';
      }
      
    $lc_text .= '</table>';
      } else {
      
    $lc_text .= '';
      } 
    Quote Originally Posted by abcisme View Post
    Would it be possible to hide the base price if I'm showing the quantity discount table?

    Click image for larger version. 

Name:	pumps.jpg 
Views:	68 
Size:	19.2 KB 
ID:	14196
    Website - Github. Like the ZCA Bootstrap 4 Template? Donations Welcome. Bootstrap Plugins?

  3. #43
    Join Date
    Jun 2006
    Posts
    298
    Plugin Contributions
    0

    Default Re: Qty Discounts on Product Listing

    PERFECT! Thank you so much for taking the time to respond to me. I really appreciate your help!

  4. #44
    Join Date
    May 2009
    Posts
    103
    Plugin Contributions
    0

    Default Re: Qty Discounts on Product Listing

    right now product quantity pricing shows on product listing page even if customer is logged in. Can anyone give the code to show the product quantity listing only to logged in customers- thanks

  5. #45
    Join Date
    May 2009
    Posts
    103
    Plugin Contributions
    0

    Default Re: Qty Discounts on Product Listing

    right now product quantity pricing shows on product listing page even if customer is logged in. Can anyone give the code to show the product quantity listing only to logged in customers- thanks Capture.JPG

  6. #46
    Join Date
    May 2009
    Posts
    103
    Plugin Contributions
    0

    Default Re: Qty Discounts on Product Listing

    Never mind. Fixed it.

 

 
Page 5 of 5 FirstFirst ... 345

Similar Threads

  1. Qty Discounts on Product Listing
    By idc1 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 8 Aug 2018, 11:21 PM
  2. v154 "Qty Discounts Off Price" on Product page only displays one row of discounts
    By Zean in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 4
    Last Post: 23 Feb 2016, 06:52 AM
  3. Mod to display qty. discounts in category listing?
    By DCDC in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 25 May 2010, 06:53 PM
  4. Display "Qty Discounts Off Price" table Product Listing intead of Detail
    By digulu in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 30 Dec 2009, 01:34 AM
  5. Category index listing - products with qty discounts
    By bodyjewelrystores in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 13 Sep 2006, 06:31 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