Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2007
    Location
    in Taipei, of course
    Posts
    29
    Plugin Contributions
    0

    help question Attributes - Works fine but TMO: Don't want to display weights of item

    Hi, yet another attribute question.

    Thanks to the useful answers on this thread I was able to at least get some attributes going, but, I hit a new wall!

    Here it goes:
    my products are sold by weight and I would like my attribute box to look like:
    Sample (20g) 4$
    75g 8$
    150g 12$
    300g 15$
    (Sample, 75g, 150g, 300g are the values I gave)

    INSTEAD of their actual look;
    Sample (20g) (2$) (0.02kg)
    75g (8$) (0.08kg)
    150g (12$) (0.15kg)
    300g (15$) (0.3kg)

    So how do I get rid of the weight and the ugly () enclosing the price???

    PS: The shipping weight calculates just fine, so does the price.

    Xie xie in advance!

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Attributes - Works fine but TMO: Don't want to display weights of item

    Admin > Catalog > Product Types > edit layout > Show Attribute Weight.

    The parentheses are built in rather deep in the code. Find this bit in /includes/modules/your_template/attributes.php, around line 157:
    PHP Code:
                          } else {
                            
    // normal price
                            
    if ($new_attributes_price == 0) {
                              
    $products_options_display_price'';
                            } else {
                              
    $products_options_display_price' (' $products_options->fields['price_prefix'] .
                              
    $currencies->display_price($new_attributes_pricezen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ') ';
                            } 
    You will see ..._price= ' (' . $prod... and ...'products_tax_class_id'])) . ') ';
    Remove the parentheses between single quotes, but leave the spaces:

    PHP Code:
    ..._price'  ' $prod... 
     ...
    'products_tax_class_id'])) . '  '
    Last edited by gjh42; 22 Apr 2007 at 12:07 PM.

  3. #3
    Join Date
    Apr 2007
    Location
    in Taipei, of course
    Posts
    29
    Plugin Contributions
    0

    Default Re: Attributes - Works fine but TMO: Don't want to display weights of item

    Thanks a million! Helpful and very quick reply! Thanks!

  4. #4
    Join Date
    Jul 2008
    Posts
    8
    Plugin Contributions
    0

    Default Re: Attributes - Works fine but TMO: Don't want to display weights of item

    pls help me how to display attribute weight in product page?

    thanks

 

 

Similar Threads

  1. Add products but don't want them to display
    By jessica_aw in forum General Questions
    Replies: 1
    Last Post: 22 Mar 2011, 12:13 AM
  2. Some images don't display in IE but some do. Fine in Firefox though!
    By arniesbarmyarmy in forum General Questions
    Replies: 8
    Last Post: 8 Dec 2009, 06:58 PM
  3. Works Fine In Safari, But Not In Firefox
    By cbird1057 in forum Installing on a Mac Server
    Replies: 0
    Last Post: 30 Mar 2008, 02:44 AM
  4. My www broke but my http:// works fine.
    By birdoasis in forum General Questions
    Replies: 11
    Last Post: 23 Oct 2007, 12:47 AM

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