Page 6 of 8 FirstFirst ... 45678 LastLast
Results 51 to 60 of 73
  1. #51
    Join Date
    Feb 2009
    Posts
    4
    Plugin Contributions
    0

    Default Re: Quantity Discounts

    I implemented the code below and I am getting $0.00 on any items with a quantity discount on an attribute.

    They are marked with "Price by attributes" in the admin area, yet it just pulls zeros instead of the actual lowest price.

    PHP Code:
    // case 'PRODUCT_LIST_PRICE':
    // $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
    // $lc_align = 'right';
    // $lc_text = $lc_price;
    // I made some mod's below this
    case 'PRODUCT_LIST_PRICE':
    // $lc_price = zen_get_products_discount_price_qty((int)$_GET['products_id'],20000);
    $lc_price zen_get_products_discount_price_qty((int)$listing->fields['products_id'],20000);
    $lc_price number_format($lc_price2);
    $lc_text='<b><font color="red">As low as: $' $lc_price '</font></b><br>'

  2. #52
    Join Date
    Nov 2009
    Posts
    32
    Plugin Contributions
    0

    Default Re: Quantity Discounts

    This thread solved a problem bugging me for hours. Thanks Linda and ZenLova.

    The site I used this code for is Australian with 10% tax so i added
    a simple calculation so prices include 10% tax.

    In tpl_product_info_display.php I replaced this:
    HTML Code:
    <!--bof Product Price block -->
    <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>
    <!--eof Product Price block -->
    With this:
    HTML Code:
    <!--bof Product Price block --><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 = '';
      }
    $cheapest = zen_get_products_discount_price_qty((int)$_GET['products_id'],20000);
    $cheapest = number_format($cheapest, 2);
    
    //  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']);
    
    $Subtotal = $cheapest;
    $Tax = round( (($cheapest * "10") / 100 ), 2);
    $Total = ($Tax + $Subtotal);
    ?>
    Subtotal: $<? echo $Subtotal; ?><br>
    GST : $<? echo $Tax; ?><br>
    Total: $<? echo $Total; ?><br>
    </h2>
    <!--eof Product Price block -->

  3. #53
    Join Date
    Nov 2009
    Posts
    32
    Plugin Contributions
    0

    Default Re: Quantity Discounts

    This is what i ended up using...
    Code:
    <!--bof Product Price block -->
    <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']);
    
        $cheapest = zen_get_products_discount_price_qty((int)$_GET['products_id'],20000);
        $cheapest = number_format($cheapest, 2);
        $tax = round( (($cheapest * "10") / 100 ), 2);
        $total = ($tax + $cheapest);
    ?>
    Sub Total: $<? echo $cheapest; ?><br>
    GST : $<? echo $tax; ?><br>
    Total: $<? echo $total; ?>
    </h2>
    <!--eof Product Price block -->

  4. #54
    Join Date
    Feb 2010
    Posts
    1
    Plugin Contributions
    0

    Default Re: Quantity Discounts

    Hi..
    I think you have to go with the problem in FAQ or you can use the internet for your zen-cart.

  5. #55
    Join Date
    Dec 2007
    Posts
    25
    Plugin Contributions
    0

    Default Re: Quantity Discounts

    I am using Zen 1.38a with 1.10a quantity discount mod.
    I want to discount 2nd and 3rd products from the same category by 25% but not the first item in the cart.
    I have got it to work by using the currency amount. My problem is I want to exclude other product id's.
    I edited the function Product Exclusion in file ot_quantity_discount but it didn't work. It's in the custom folder. When I add the excluded product to cart it still shows discount for 2 products.
    Thanks, Shawn

  6. #56
    Join Date
    Dec 2007
    Posts
    25
    Plugin Contributions
    0

    Default Re: Quantity Discounts

    Here is what my ot_quantity_discount file looks like

    // Add products you wish to exclude to this list.
    // Go to Admin->Catalog->Categories/Products->[Your category]
    // and look at the left hand side of the list to determine
    // product id. Note that 99999 and 99998 are just given
    // as examples.
    function exclude_product($prid) {
    $id = (int)$prid;
    switch($id) {
    case 3:
    return false;
    }
    return true;
    }

    3 is the product id I want to exclude.
    Thanks, Shawn

  7. #57
    Join Date
    Sep 2009
    Posts
    5
    Plugin Contributions
    0

    Default Re: Quantity Discounts

    I'm running Zen Cart v1.3.8a/v1.3.8 and I've instituted the following code (which I got from page 3 of this thread) in my product_listing.php file to display the lowest price available with quantity discounts:

    Code:
    case 'PRODUCT_LIST_PRICE':
    //	$lc_price = zen_get_products_discount_price_qty((int)$_GET['products_id'],20000);
    $lc_price = zen_get_products_discount_price_qty((int)$listing->fields['products_id'],20000);
    $lc_price = number_format($lc_price, 2);
    $lc_text='As low as: $' . $lc_price . '<br>';
    It works great on my category index pages main product listing area, but when I implement it in my new_products.php and featured_products.php module files, it displays the "As low as" price as $0.00 on every page that module is used on except the sub-category listing page. In other words it works here: http://babybeecards.com/index.php?ma...ndex&cPath=1_3
    but not here: http://babybeecards.com/index.php?ma...=index&cPath=1

    On my new_products.php mod file the code looks like this:
    Code:
    while (!$new_products->EOF) {
        $products_price = zen_get_products_discount_price_qty((int)$new_products->fields['products_id'],20000);
        $products_price = number_format($lc_price, 2);
        $lc_text='As low as: $' . $products_price . '<br>';
        if (!isset($productsInCategory[$new_products->fields['products_id']])) $productsInCategory[$new_products->fields['products_id']] = zen_get_generated_category_path_rev($new_products->fields['master_categories_id']);
    
        $list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
        'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><br />' . $lc_text);
    Can anyone help me out?

  8. #58

    Default Re: Quantity Discounts

    I am sorry for my ignorance but I can't seem to find how to change this number that is controlling this $products_discount_type != 0 . where on the admin side do you control that? thanks!

  9. #59

    Default Re: Quantity Discounts

    nevermind...figured it out

  10. #60
    Join Date
    Sep 2008
    Posts
    37
    Plugin Contributions
    0

    Default Re: Quantity Discounts

    I used the code from page 3 on this thread so my code looks like this:

    <strong><h2 id="productPrices" class="productGeneral">
    <?php
    $cheapest = zen_get_products_discount_price_qty((int)$_GET['products_id'],20000);
    $cheapest = number_format($cheapest, 2);
    echo 'As low as: $' . $cheapest . '<br>';
    // 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></strong>

    and now I have the "As low as..." working, but how do I get rid of the regular price from appearing underneath it?
    You can see what I mean here:
    http://blowoutparty.com/index.php?ma...roducts_id=483

 

 
Page 6 of 8 FirstFirst ... 45678 LastLast

Similar Threads

  1. v150 Quantity Discounts
    By dfontana in forum General Questions
    Replies: 4
    Last Post: 13 Aug 2012, 03:49 PM
  2. Product quantity price discounts & group discounts
    By Richard.Tung in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 11 Jun 2009, 03:24 PM
  3. Quantity Discounts?
    By FLGator in forum Setting Up Categories, Products, Attributes
    Replies: 10
    Last Post: 14 Jul 2008, 02:58 AM
  4. Quantity Discounts
    By Michele in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 0
    Last Post: 28 Aug 2007, 04:51 AM
  5. Quantity Discounts
    By andes in forum General Questions
    Replies: 5
    Last Post: 14 Aug 2007, 07:53 PM

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