Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 35
  1. #21
    Join Date
    Dec 2004
    Posts
    1,031
    Plugin Contributions
    0

    Default Re: Qty Discount - Display lowest price & "Start At" text

    Here is a thought...

    How much money would we have to raise, donate for you to release this as a free mod? Is this even an option for you?

    PM me if you feel this is not right for posting in the forum.
    Live and learn... the Zen way.

  2. #22
    Join Date
    Jan 2006
    Posts
    224
    Plugin Contributions
    0

    Default Re: Qty Discount - Display lowest price & "Start At" text

    This is what I did, instead of replace the price, I put the code within the discount table region, thus encompassing with the conditional code:
    Code:
     
     
    <!--bof Quantity Discounts table -->
    <?php
      if ($products_discount_type != 0) { ?>
    <p>Bulk purchase price from
    <h2>
    <?php
      //echo $one_time . ($flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']);
    echo ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . $currencies->display_price(zen_get_products_discount_price_qty((int)$_GET['products_id'], 999999), zen_get_tax_rate($products_tax_class_id));
    ?></h2>
    <?php
    /**
    * display the products quantity discount
    */
    require($template->get_template_dir('/tpl_modules_products_quantity_discounts.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_products_quantity_discounts.php'); ?>
    <?php
      }
    ?>
    <!--eof Quantity Discounts table -->

  3. #23
    Join Date
    Jan 2008
    Posts
    26
    Plugin Contributions
    0

    Default Re: Qty Discount - Display lowest price & "Start At" text

    Thanks mydanilo,
    I am going to try this but on what line in the tpl_product_info_display.php do i add the following code ?

    $cheapest = zen_get_products_discount_price_qty((int)$_GET['products_id'],20000);
    $cheapest = number_format($cheapest, 2);
    echo 'As low as: $' . $cheapest . '<br>';

    Thanks

  4. #24
    Join Date
    Dec 2004
    Posts
    1,031
    Plugin Contributions
    0

    Default Re: Qty Discount - Display lowest price & "Start At" text

    Line 193 or just search for this code:
    PHP 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']); 
    and replace or put just below if you want both prices:
    PHP Code:
    $cheapest zen_get_products_discount_price_qty((int)$_GET['products_id'],20000);
    $cheapest number_format($cheapest2);
    echo 
    'As low as: $' $cheapest '<br>'
    Live and learn... the Zen way.

  5. #25
    Join Date
    Jan 2006
    Posts
    224
    Plugin Contributions
    0

    Default Re: Qty Discount - Display lowest price & "Start At" text

    Hi mydanilo,
    For the product_listing, I took your code, so the results is it will show as low as if there is a discount table, and the normal or special price if no discount table. Functionally great.
    But it lost some important stuff:

    - Normal price strike out and red special price
    - Sold out logo
    - call for price logo

    now everything is black. It must be fixable?

  6. #26
    Join Date
    Jun 2008
    Posts
    3
    Plugin Contributions
    0

    Default Re: Qty Discount - Display lowest price & "Start At" text

    Hey

    I wanted to display the whole product quantity discount box on my category listing pages but after reading the messages in this thread copied what was in here and made the following change to the products listing template.

    Its a hack of what mydanilo posted, and it suits my purpose for the time being. I think the only change is I made the style be driven by the css, require definition of a new var TEXT_PRODUCT_LISTING_LOW_PRICE in the languages files for whatever text you want before the price range, and I display the range.

    A lot of assumptions are made in the code and it probably doesn't deal with all scenarios but its a quick solution till I need something better, thought it might help other people who want something quick and yes its a total rip off of mydanilo's code but with tweaks

    // ORIGINAL PRICING INFORMATION
    // $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
    // $lc_align = 'right';
    // $lc_text = $lc_price;

    // PRICING TAKING INTO CONSIDERATION DISCOUNTS
    $discount_price_real = zen_get_products_discount_price_qty((int)$listing->fields['products_id'],20000);
    $discount_price = '$'.number_format($discount_price_real, 2);
    $actual_price_real = zen_get_products_actual_price((int)$listing->fields['products_id']);
    $actual_price = '$'.number_format($actual_price_real, 2);

    if ($discount_price_real < $actual_price_real)
    {
    $lc_text='<span class="low_price">' . TEXT_PRODUCT_LISTING_LOW_PRICE . $discount_price . ' - ' . $actual_price . "</span>";
    } else {
    $lc_text = zen_get_products_display_price($listing->fields['products_id']);
    }

    I guess you could always keep the original pricing stuff as well as the range, by appending the original lc_text value after the span for the range. If thats what displays all the call for price stuff... I dont know how messy that will make the information, might be too confusing. Unless your Low Price text clarifies what the range is.....

    :)

  7. #27
    Join Date
    Mar 2007
    Location
    Lakeland, FL, US
    Posts
    44
    Plugin Contributions
    2

    Idea or Suggestion Re: Qty Discount - Display lowest price & "Start At" text

    I have finished rewriting the mod after losing the original code. The new code will be easier to follow and implement. No core files are modified, but 1 language file, 8 templates, 2 sideboxes and 3 modules are included in the package in their respective YOUR_TEMPLATE folders.

    I recently uploaded an 'EZ-Pages Meta Tags' mod to the downloads area that allows you to add meta tags (title, keywords, description) using the ez-pages editor, but the "powers that be" have not activated it. Once I see it listed as available to download, I *MIGHT* consider uploading this package.

    If you don't want to wait to see if it will become a free download, PM me for a price and we'll get you taken care of. A non-disclosure agreement will be required at the time of purchase to protect our interests. The new mod can be viewed in action on one of our testing sites upon PM request.

    PS: I do not normally charge for mods, but this one will get downloaded by others in our industry who also use ZC. This means I would have written free code to help those whom we compete against for customers

  8. #28
    Join Date
    Aug 2008
    Posts
    16
    Plugin Contributions
    0

    Default Re: Qty Discount - Display lowest price & "Start At" text

    I sent you a private message, I hope you're still reading the forum .

  9. #29
    Join Date
    May 2008
    Posts
    34
    Plugin Contributions
    0

    Default Re: Qty Discount - Display lowest price & "Start At" text

    The mod that ebspromo is trying to sell sounds like it might be nice, but I personally don't really see the need for it. If you're somewhat familiar with PHP, the code posted freely in this thread (thank you!) should do the trick.

    As for there being hard coded styles and text...it is pretty easy to fix that too. Just replace the <span style="..."> tag with <span class="whatever">, and add a new definition to a language file and you're set. So long as you're utilizing the override system and have the files you're editing copied into a YOUR_TEMPLATE folder it should update just fine. It seems much simpler to update a couple files that are already there than to add a bunch of extra ones.

    Thanks to mydanilo and others for sharing their knowledge.
    Last edited by jaydee98273; 10 Oct 2008 at 11:55 PM. Reason: Spelling

  10. #30
    Join Date
    Jan 2009
    Location
    Vegas Baby!
    Posts
    332
    Plugin Contributions
    0

    Default Re: Qty Discount - Display lowest price & "Start At" text

    I'm trying to get this code to work, however, it shows the "as low as" price even if there is no discount on the product.

    Any ideas on what the correct code would be to display the regular price if no discount and the cheapest price is there is a discount?

    Following post #24, I put the code below to show both prices:

    "tpl_product_info_display.php":

    Line 193 or just search for this 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']);

    and replace or put just below if you want both prices:

    $cheapest = zen_get_products_discount_price_qty((int)$_GET['products_id'],20000);
    $cheapest = number_format($cheapest, 2);
    echo 'As low as: $' . $cheapest . '<br>';

    So I've got this:

    <?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);
    echo 'As low as: $' . $cheapest . '<br>';
    ?>

 

 
Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. v151 "Starting at" price not the lowest price
    By RixStix in forum Upgrading to 1.5.x
    Replies: 13
    Last Post: 28 Jun 2014, 06:31 PM
  2. 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
  3. v150 How do I edit Product Listing "Price", "Qty." and Product Info Move "details"?
    By schobook in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 18 Jan 2013, 01:02 AM
  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

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