Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2005
    Posts
    107
    Plugin Contributions
    0

    Default Attributes formatting

    Hello
    I need to create some attributes and then format the output!

    I can create the attributes ok, I need to create text attributes and format the end result so that when the user goes to checkout the text output from the attributes selections are neat and tidy! what file/s would i ned to tweak to get the results tidy?
    example: I make an text attribute called "name" when the user fills in the box NAME [ Fred Flinstone] the resulting text on the order shows NAME: Fred Flintstone.
    I would like it to show, Fred Flintstone (without "name") is this possible?

    Cheers
    Andy

  2. #2
    Join Date
    Oct 2005
    Posts
    107
    Plugin Contributions
    0

    Default Re: Attributes formatting

    I have been looking through the wiki and found that one of the pages i need to change the look of is "Shopping_cart"

    Does any one know which file inputs "text attributes" into shopping_cart?
    I need to change the format of the text attributes being put into shopping_cart.

    ie: I make option name=name type=radio (selected) value=fred

    In the shopping_cart I get
    • name - fred


    What page can i edit to get just "fred" in shopping_cart, I also need this in the (backoffice customers, orders) as well!!!

    Can any advise please
    Andy

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

    Default Re: Attributes formatting

    To use Attributes for every name would not be adviseable ...

    You would be better off using an Option Name such as Name with the Option Type of TEXT ...

    Then add that to your Product as:
    Option Name: Name
    Option Type: TEXT
    Mark it as Required if needed ... to force a choice

    Trying to make attributes manage 100s of names and customers attempt to pick one is really too difficult ...
    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!

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

    Default Re: Attributes formatting

    NOTE: There are two methods of Text attributes ...

    On the Option Names Manager ...

    Setup the Option Names for text input such as:
    Option Name: First Name
    Option Type: TEXT
    Sort Order: 10

    Option Name: Second Name
    Option Type: TEXT
    Sort Order: 20

    etc. etc.

    If you need one of these to be more or less a note or letter ... AFTER you create it in the method above, Edit it ...

    There are additional options when you Edit to set:
    Rows, Display Size and Max Length are for Text Attributes Only:

    These would let you set a TEXT input to a TEXTAREA so that you could make it, for example, 10 Rows high and allow 500 characters ...
    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!

  5. #5
    Join Date
    Oct 2005
    Posts
    107
    Plugin Contributions
    0

    Default Re: Attributes formatting

    Thanks

    And how can i remove the bullets and hyphens as in the pic attached?

    Regards
    Andy
    Attached Images Attached Images  

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

    Default Re: Attributes formatting

    That is in your stylesheet ... you might post an URL to that product and someone can look at what needs changing ...
    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!

  7. #7
    Join Date
    Oct 2005
    Posts
    107
    Plugin Contributions
    0

    Default Re: Attributes formatting

    OK
    I have been working on this all day and have worked it out (i think).

    If anyone wishes to remove bullets, option names and hyphens from the shopping_cart and back office order check below, ps: i did not remove them from invoices and packing slips, if you need to do that youll need to investigate a little.

    This fix works ok for me, I'm no expert, if you want to use it thats great but it would be good for an expert to look at it first .

    here is what i did.


    To remove bullets hyphens and title (option name) from text attributes.

    If you remove the bullets (<li> "list item" ) the list format will be lost so replace it with a transparent image.

    Create a new class in (your_template/css/stylesheet .css) file using a 1x1 transparent image to replace the standard bullet.

    .bully {
    list-style-position: inside;
    list-style-image: url(http://yourdomain.com/images/bully.gif);
    }

    ---------------------------------------------------------
    INCLUDES/TEMPLATES/YOUR_TEMPLATE/TEMPLATES/tpl_shopping_cart_default.php

    Line:98

    CHANGE:
    <li><?php echo $value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']); ?></li>

    TO:
    <li class="bully"><?php echo $value[''] . nl2br($value['products_options_values_name']); ?></li>


    ---------------------------------------------------------
    INCLUDES/TEMPLATES/YOUR_TEMPLATE/TEMPLATES/tpl_checkout_confirmation_default.php

    Line:131

    CHANGE:
    <li><?php echo $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br($order->products[$i]['attributes'][$j]['value']); ?></li>

    TO:
    <li class="bully"><?php echo $order->products[$i]['attributes'][$j][''] . '' . nl2br($order->products[$i]['attributes'][$j]['value']); ?></li>
    -----------------------------------------------------------
    ADMIN/orders.php ( for some reason the override won't work on this file ie: admin/your_template orders.php, so rename the original and make a copy somewhere and also

    keep a copy of your changed file as well in case of upgrades)

    Line:414

    CHANGE:
    echo '<br /><nobr><small>&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br($order->products[$i]['attributes'][$j]['value']);

    TO:
    echo '<br /><nobr><small>' . $order->products[$i]['attributes'][$j][''] . '' . nl2br($order->products[$i]['attributes'][$j]['value']);


    As i said im no expert so treat this as a

    Andy

 

 

Similar Threads

  1. v139h Formatting Product Attributes
    By ZSchinelli in forum General Questions
    Replies: 2
    Last Post: 10 Jul 2013, 07:40 PM
  2. Formatting For Product Attributes
    By vandydavid in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 22 Sep 2011, 01:38 PM
  3. Formatting Issues with Attributes
    By wingsfan70 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 9 Nov 2009, 03:39 PM
  4. Formatting attributes
    By valnoren in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 23 Jul 2007, 11:35 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