Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2008
    Location
    Ontario, Canada
    Posts
    57
    Plugin Contributions
    0

    Default Removing Parenthesis from Attribute Prices

    Hello,
    I am looking for a CURRENT answer on how to remove parenthesis from attribute prices. I've tried to research this question to the best of my ability and i have found some old answers
    ( http://www.zen-cart.com/forum/showth...028#post416028 )
    that suggest customizing the code in the
    includes/modules/attributes.php file. i've looked and looked and can not find where i am suppose to remove the () in the attributes.php file.

    Help Please

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Removing Parenthesis from Attribute Prices

    If you search through the attributes.php module you will find several references to:
    $products_options_display_price

    This is the price and how it will be displayed ...

    There are parens added to surround the price and you would need to edit these so as not to have them showing ...

    In v1.3.8 these were changed to constants for easier modification, the Developers Tool Kit would show on a search for:
    $products_options_display_price

    that it is used with:
    PHP Code:
    /includes/modules/attributes.php

    Line 
    #145 : $products_options_display_price= ATTRIBUTES_PRICE_DELIMITER_PREFIX . $products_options->fields['price_prefix'] .

    Line #157 : $products_options_display_price= ATTRIBUTES_PRICE_DELIMITER_PREFIX . $products_options->fields['price_prefix'] . 
    There is also in those same sections:
    ATTRIBUTES_PRICE_DELIMITER_SUFFIX

    A search on these would show where they are defined by product type ...

    You can use your templates and overrides to change the defines and not need to touch the code ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Jun 2008
    Posts
    9
    Plugin Contributions
    0

    Default Re: Removing Parenthesis from Attribute Prices

    Just so happens I was looking to do the same thing. I got it to work by commenting a line out around where the previous poster was pointing to.

    I commented out:

    Code:
    else {
    $products_options_display_price= ATTRIBUTES_PRICE_DELIMITER_PREFIX . $products_options->fields['price_prefix'] .
    $currencies->display_price($new_attributes_price, zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ATTRIBUTES_PRICE_DELIMITER_SUFFIX;
                            }
    My editor is Coda and that is around line 158-161 or so.

  4. #4
    Join Date
    Mar 2009
    Posts
    5
    Plugin Contributions
    0

    Default Re: Removing Parenthesis from Attribute Prices

    Have been searching the forum all day (FAQs and Forum) and have tried different suggestions to remove the parenthesis around the attribute prices. Unfortunately, I must be interpreting the directions wrong... When I remove a "(" or comment out a line from includes/modules/attributes.php (example below), nothing works...

    $products_options_display_price= ATTRIBUTES_PRICE_DELIMITER_PREFIX . $products_options->fields['price_prefix'] .

    Is there any way someone can post exactly how to do this with the parenthesis to be removed highlighted in a different color? Or perhaps provide a before and after example of the edits?

    Any help will be greatly appreciated!

    Zen Version: Zen Cart 1.3.8a

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Removing Parenthesis from Attribute Prices

    Did you try customizing the file:
    includes/languages/english/product_info.php
    Line #42 : define('ATTRIBUTES_PRICE_DELIMITER_PREFIX', ' ( ');
    And change to read:
    define('ATTRIBUTES_PRICE_DELIMITER_PREFIX', ' ');
    And the line:
    /includes/languages/english/product_info.php
    Line #43 : define('ATTRIBUTES_PRICE_DELIMITER_SUFFIX', ' )');
    to read:
    define('ATTRIBUTES_PRICE_DELIMITER_SUFFIX', ' ');
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Mar 2009
    Posts
    5
    Plugin Contributions
    0

    Default Re: Removing Parenthesis from Attribute Prices

    Linda,

    Thank you, thank you, thank you!! It worked!

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Removing Parenthesis from Attribute Prices

    Thanks for the update that editing the language files was able to customize the look of the Attribute prices ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  8. #8
    Join Date
    Sep 2010
    Posts
    6
    Plugin Contributions
    0

    Default Re: Removing Parenthesis from Attribute Prices

    Quote Originally Posted by polarbear View Post
    Just so happens I was looking to do the same thing. I got it to work by commenting a line out around where the previous poster was pointing to.

    I commented out:

    Code:
    else {
    $products_options_display_price= ATTRIBUTES_PRICE_DELIMITER_PREFIX . $products_options->fields['price_prefix'] .
    $currencies->display_price($new_attributes_price, zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ATTRIBUTES_PRICE_DELIMITER_SUFFIX;
                            }
    My editor is Coda and that is around line 158-161 or so.


    THANK you soooo much it worked a treat on mine! i couldnt get the first post to work because the screen went blank. But this was perfect

    Cheers

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Removing Parenthesis from Attribute Prices

    Keep in mind that this is built into Zen Cart and can be changed in the language files with your templates and overrides rather than touching in the code files ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. Remove Decimal from Attribute Prices?
    By swamyg1 in forum Setting Up Categories, Products, Attributes
    Replies: 11
    Last Post: 17 Oct 2012, 04:08 AM
  2. Removing Decimals from Prices
    By voltage in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 16 Oct 2012, 06:00 AM
  3. Removing ( and ) from attribute prices
    By palm in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 26 May 2009, 04:41 PM
  4. Removing Prices from Sidebar
    By bailiegirl in forum General Questions
    Replies: 7
    Last Post: 30 Jan 2009, 07:01 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