Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,492
    Plugin Contributions
    88

    Default Priced by attributes: Show only price?

    I've got a product (Zen Cart v1.5.3) set as "Priced by Attributes", base price is 0, attribute-specific price is the price. Is there any way to get the display for each option to display as just the price, e.g. $25.00, instead of $25.00 ($25.00) -- i.e. losing the parenthetical, unneeded bit?

  2. #2
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Priced by attributes: Show only price?

    I'm a bit confused. (not that I would be of much help even if I understood)

    Are you saying you see the price in front of the parenthesis and inside the parenthesis

    OR
    Like this and just want the parenthesis to disappear?

    Please Choose: Metal

    Argentium ( $85.21 (USD) )
    Sterling ( $78.88 (USD) )
    Silver-filled ( $63.11 (USD) )
    Yellow GF ( $123.49 (USD) )
    Bronze (rosy) ( $50.53 (USD) )
    Copper ( $45.15 (USD) )
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

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

    Default Re: Priced by attributes: Show only price?

    Am I correct in guessing that your Option Values are called:
    $10.00
    $20.00
    $30.00

    Or, what does the layout look like for the Option Name Option Value on each Option Name set?
    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: v1.5.5]
    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!

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,492
    Plugin Contributions
    88

    Default Re: Priced by attributes: Show only price?

    Yes, the option values' text is their dollar value and were displaying as:
    Code:
    Amount  Please select a value...
    $25.00 ( $25.00 )
    $50.00 ( $50.00 )
    $75.00 ( +$75.00 )
    $100.00 ( +$100.00 )
    $125.00 ( +$125.00 )
    $150.00 ( +$150.00 )
    $175.00 ( +$175.00 )
    $200.00 ( +$200.00 )
    $250.00 ( +$250.00 )
    $300.00 ( +$300.00 )
    What I did was to edit /includes/languages/english/MY_TEMPLATE/product_info.php (since the product in question uses this product type) to change the attributes' price-delimiters:
    Code:
    define('ATTRIBUTES_PRICE_DELIMITER_PREFIX', '<span class="attr-price"> ( ');
    define('ATTRIBUTES_PRICE_DELIMITER_SUFFIX', ' )</span>');
    and then created a product-specific .CSS file (p_210.css for products_id 210) to "hide" the attributes' repeated price:
    Code:
    .attr-price { display: none; }

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

    Default Re: Priced by attributes: Show only price?

    That works fairly handily ... I will have to remember that one ...
    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: v1.5.5]
    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
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,492
    Plugin Contributions
    88

    Default Re: Priced by attributes: Show only price?

    That worked OK for radio-button attributes, but for dropdown menu ones the <span></span> shows in the menu. Arggh.

  7. #7
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Priced by attributes: Show only price?

    Quote Originally Posted by lat9 View Post
    That worked OK for radio-button attributes, but for dropdown menu ones the <span></span> shows in the menu. Arggh.
    Stock by attributes has an option name type that handles html in the dropdown... Not sure something like that would be able to be taken from...

    Mind you it's a long way around your elbow to get to your ear though. :)
    Last edited by mc12345678; 4 Dec 2014 at 09:35 PM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #8
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,492
    Plugin Contributions
    88

    Default Re: Priced by attributes: Show only price?

    Thanks, mc12345678; I went the jQuery route with a bit of (granted, hard-coded) code that will cover the option name (options_id 14 for my case) I want to strip the parenthetical amount from in either a dropdown or radio-button configuration:
    Code:
    $(document).on ('ready', function(){
      $("#attrib-14 option, #productAttributes label[for^=\"attrib-14-\"]").each(function(){
        var parenStart = $(this).text().indexOf ('(');
        if (parenStart != -1) {
          $(this).text($(this).text().substring(0, parenStart));
        }
      });
    });

 

 

Similar Threads

  1. products Priced by attributes show all no drop down
    By vantecsigns in forum General Questions
    Replies: 0
    Last Post: 2 Mar 2012, 06:20 AM
  2. Removed Pricing For Products Priced By Attributes Only!!
    By trendypixels in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 20 Feb 2009, 11:45 PM
  3. Shopping cart doubling price of products priced by attributes
    By Kellyami in forum Setting Up Categories, Products, Attributes
    Replies: 8
    Last Post: 7 Oct 2008, 07:45 PM
  4. remove price in product listing when priced by attributes
    By Thunder in forum Setting Up Categories, Products, Attributes
    Replies: 9
    Last Post: 30 Sep 2008, 05:41 PM
  5. Include in Base Price When Priced by Attributes
    By David Bo in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 16 Jan 2008, 10:19 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