Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    May 2014
    Posts
    68
    Plugin Contributions
    0

    Default Can Attribute Show Certain Words on $0 Attributes?

    Zen Cart Version 1.5.1

    I am not sure if this going to be simple or more complicated.
    What I wanted to do is to have attributes that have $0 to show certain wording.

    I wanted attributes to look similar to eMed Hospital Beds site.
    http://www.emedhospitalbeds.com/inva...e&utm_term=561

    Currently, this is how attributes look...

    http://homepromedical.com/cart/beds-...-bed-p-65.html

    No Bed Rails
    Invacare Reduced Gap Full-length Bed Rail [6629]
    Invacare Reduced Gap Half-Length Bed Rail [6630]

    However, I do wanted to be like...

    No Bed Rails
    Invacare Reduced Gap Full-length Bed Rail [6629] (FREE!)
    Invacare Reduced Gap Half-Length Bed Rail [6630] (FREE!)

    However, I do not really want to be like...

    No Bed Rails (FREE!)
    Invacare Reduced Gap Full-length Bed Rail [6629] (FREE!)
    Invacare Reduced Gap Half-Length Bed Rail [6630] (FREE!)

    I don't want the word "FREE!" showing up on attribute that add no accessories at all.

    I'm not sure how complicated to set that up. I don't think I can do that via admin panel.

    Sincerely, PanZC2020 (April 2nd, 2015)

  2. #2
    Join Date
    Apr 2010
    Posts
    319
    Plugin Contributions
    0

    Default Re: Can Attribute Show Certain Words on $0 Attributes?

    to get you going until a better solution comes along

    in includes/modules/attributes.php

    PHP Code:
    // normal price

                            
    if ($new_attributes_price == 0) {

                              
    $products_options_display_price'';

                            } else {

                              
    $products_options_display_priceATTRIBUTES_PRICE_DELIMITER_PREFIX $products_options->fields['price_prefix'] .

                              
    $currencies->display_price($new_attributes_pricezen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ATTRIBUTES_PRICE_DELIMITER_SUFFIX;

                            }

                          }

                        } 
    change line to

    PHP Code:

                              $products_options_display_price
    ' (Free !)'
    bryan

  3. #3
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Can Attribute Show Certain Words on $0 Attributes?

    Where YOUR_TEMPLATE is the name of your active template...

    Realize that the below solution (provided by bn17311) will apply " (Free!)" to *ALL* attributes that have a zero price, not just those of any specific category, product, etc...

    Quote Originally Posted by bn17311 View Post
    to get you going until a better solution comes along

    in includes/modules/YOUR_TEMPLATE/attributes.php

    PHP Code:
    // normal price

                            
    if ($new_attributes_price == 0) {

                              
    $products_options_display_price'';

                            } else {

                              
    $products_options_display_priceATTRIBUTES_PRICE_DELIMITER_PREFIX $products_options->fields['price_prefix'] .

                              
    $currencies->display_price($new_attributes_pricezen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ATTRIBUTES_PRICE_DELIMITER_SUFFIX;

                            }

                          }

                        } 
    change line to

    PHP Code:

                              $products_options_display_price
    ' (Free !)'
    bryan
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Only offer certain attributes if another attribute is selected first
    By Sushigal in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 4 May 2010, 10:22 AM
  2. Internal Search not working for certain words
    By dertyericb in forum General Questions
    Replies: 7
    Last Post: 17 Mar 2010, 06:08 PM
  3. Can I have each attribute show its price without using Priced By Attribute?
    By linuxmant in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 18 Nov 2009, 07:58 PM
  4. Can I apply discount on certain attributes only?
    By Decostyle in forum Setting Up Specials and SaleMaker
    Replies: 21
    Last Post: 10 Dec 2008, 08:41 PM
  5. Certain words are taboo?
    By Pacuk in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 14 Jul 2006, 08:24 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