Page 1 of 2 12 LastLast
Results 1 to 10 of 73

Hybrid View

  1. #1
    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

  2. #2
    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

  3. #3
    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?

  4. #4

    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!

  5. #5

    Default Re: Quantity Discounts

    nevermind...figured it out

  6. #6
    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

  7. #7
    Join Date
    Sep 2008
    Posts
    37
    Plugin Contributions
    0

    Default Re: Quantity Discounts

    I'd like to have the regular price in the product listings with the As Low As price underneath it.

    What do I need to change in this code in the includes\modules\product_listing.php file? (this is from post #27 by ZenLova)

    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='<b><font color="red">As low as: $' . $lc_price . '</font></b><br>';


    This is the original:


    case 'PRODUCT_LIST_PRICE':
    $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
    $lc_align = 'right';
    $lc_text = $lc_price;

  8. #8
    Join Date
    Oct 2004
    Posts
    1,045
    Plugin Contributions
    0

    Default Re: Quantity Discounts

    Quote Originally Posted by Genevieve View Post
    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?
    You need to edit your tpl_modules_products_new_listing.php file with this code:

    if ((PRODUCT_NEW_LIST_PRICE != '0' and zen_get_products_allow_add_to_cart($products_new->fields['products_id']) == 'Y') and zen_check_show_prices() == true) {

    $products_price = zen_get_products_discount_price_qty((int)$products_new->fields['products_id'],20000);
    $products_price = number_format($products_price, 2);
    $lc_text='As low as $' . $products_price . '<br>';

    $display_products_price = $lc_text . str_repeat('<br clear="all" />', substr(PRODUCT_NEW_LIST_PRICE, 3, 1)) . (zen_get_show_product_switch($products_new->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($products_new->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '') : '');
    } else {
    $display_products_price = '';
    }

  9. #9
    Join Date
    Oct 2004
    Posts
    1,045
    Plugin Contributions
    0

    Default Re: Quantity Discounts

    Does anyone know how to make the "As low as" text conditional on the product info display page? I want that text to only show if there are quantity discounts. If there are no quantity discounts, I want the price displayed without the extra text. I got this working on the product listing page, but not the product info display page.

    Thanks!

  10. #10
    Join Date
    Oct 2004
    Posts
    1,045
    Plugin Contributions
    0

    Default Re: Quantity Discounts

    Quote Originally Posted by Danielle View Post
    Does anyone know how to make the "As low as" text conditional on the product info display page? I want that text to only show if there are quantity discounts. If there are no quantity discounts, I want the price displayed without the extra text. I got this working on the product listing page, but not the product info display page.

    Thanks!
    Got it working. Use this code in tpl_products_info_display.php:

    <!--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);
    $price = zen_get_products_actual_price((int)$_GET['products_id']);
    $price = '$' . number_format($price, 2);

    if ( $cheapest != $price && ( !stristr($price,"productSpecialPrice") ) && ( !stristr($price,"call_for_prices") ) ) {
    echo 'As low as ' . $cheapest . '';
    }
    else {
    echo $price;
    }

    ?></h2>
    <!--eof Product Price block -->

 

 
Page 1 of 2 12 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