Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2008
    Posts
    14
    Plugin Contributions
    0

    Default Adding "per lb." after price

    Hello Everybody,

    If you go to http://www.fisherqualitymeats.com/in...roducts_id=184 you'll see my problem...I'd like to add "per lb." after the price of 50 cents. My plan is to then use attributes to convert the per lb. price into a "per steak" price (in the example page I've linked to, the per steak weight is assumed to be 4 lbs...I know that's not realistic but it illustrates the point).

    Anyway, what is the easiest way to add "per lb" to the price at the linked page?

    Thanks in advance, the Zen Cart Community has been awesome as I figure out how to use this excellent open source e-commerce platform.

    -Patrick

  2. #2
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: Adding "per lb." after price

    Quote Originally Posted by pholli4 View Post
    Hello Everybody,

    If you go to http://www.fisherqualitymeats.com/in...roducts_id=184 you'll see my problem...I'd like to add "per lb." after the price of 50 cents. My plan is to then use attributes to convert the per lb. price into a "per steak" price (in the example page I've linked to, the per steak weight is assumed to be 4 lbs...I know that's not realistic but it illustrates the point).

    Anyway, what is the easiest way to add "per lb" to the price at the linked page?

    Thanks in advance, the Zen Cart Community has been awesome as I figure out how to use this excellent open source e-commerce platform.

    -Patrick
    Ph,
    includes/ templates/ custom_template/ template/ tpl_info_display.php

    Find this:
    <!--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 -->
    Replace with this:
    <!--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']);
    ?>&nbsp;per lb</h2>
    <!--eof Product Price block -->
    Notice the red font above where I added this little tweak.
    Mark
    Hare Do

  3. #3
    Join Date
    Mar 2008
    Location
    Brussels, Belgium
    Posts
    69
    Plugin Contributions
    0

    Default Re: Adding "per lb." after price

    Hi Haredo.

    I can implement the modification you suggest, because I am selling goods that are priced per meter.
    Unfortunately, only some products (that I can identify with part of their products_model) should be priced per meter, the other products requiring the 'normal' display of prices.

    Any idea how I could implement this?

    Thanks.

  4. #4
    Join Date
    Mar 2008
    Location
    Brussels, Belgium
    Posts
    69
    Plugin Contributions
    0

    Default Re: Adding "per lb." after price

    Finally,

    I could develop the solution with a small php addition, based on Haredo's code :

    ?><?php if (substr($products_model,3,1) == "S") { echo '/m'; } ?></h2>

    The logic in this small piece of code is based on the fact that only products having a "S" in the fourth position have to be priced per meter.

    I am however a little bit confused about other templates where I should implement this modification (i.e. various product listings).
    Any help about this will be appreciated.

  5. #5
    Join Date
    Jun 2008
    Posts
    12
    Plugin Contributions
    0

    Default Re: Adding "per lb." after price

    I have a similar situation in which I need some products to read "per lb." and others "per foot". Let me know if anyone has any ideas. Thanks.

  6. #6
    Join Date
    Mar 2008
    Location
    Brussels, Belgium
    Posts
    69
    Plugin Contributions
    0

    Default Re: Adding "per lb." after price

    Quote Originally Posted by caga595 View Post
    I have a similar situation in which I need some products to read "per lb." and others "per foot". Let me know if anyone has any ideas. Thanks.
    If you are able to make a distinction between products needing 'per lb' and products needing 'per foot' based on their respective product models, then you might use a code similar to the one I used.

  7. #7
    Join Date
    Jun 2008
    Posts
    12
    Plugin Contributions
    0

    Default Re: Adding "per lb." after price

    Tryphon,

    Yes, I'd be interested in trying out that code.

 

 

Similar Threads

  1. Replies: 0
    Last Post: 27 Nov 2011, 06:04 PM
  2. Shopping cart - trying to turn off "Total Items" "Weight" and "Price"
    By deshojo in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 4 Apr 2011, 07:15 PM
  3. Remove "Product Image" "Item Name" and "Price"...
    By rebekah in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 22 Sep 2008, 06:08 PM
  4. HOW TO- make price show "per/month"
    By iamperez247 in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 30 Jul 2008, 08:32 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