Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Jun 2006
    Posts
    9
    Plugin Contributions
    0

    how do i show model # in shopping cart

    A little more help if you please. I found a post by "ingenuitor" dated Sept. 20 where he (she) posted some code to make the modle # show in the shopping cart.
    This was -
    Code:
    $products_name = '<table border="0" cellspacing="0" cellpadding="0" width=100%>' .
    ' <tr>' .
    ' <td class="ZZZproductListing-data" align="center" width=85><a href="' . zen_href_link(zen_get_info_page($products[$i]['id']), 'products_id=' . $products[$i]['id']) . '">' . (IMAGE_SHOPPING_CART_STATUS == 1 ? zen_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], IMAGE_SHOPPING_CART_WIDTH, IMAGE_SHOPPING_CART_HEIGHT,'class=image_border') : '') . '</a>&nbsp;</td>' 
    
    ' <td class="ZZZproductListing-data" valign="top"><a style="font-size:10px;" href="' . zen_href_link(zen_get_info_page($products[$i]['id']), 'products_id=' . $products[$i]['id']) . '">' . $products[$i]['model'] . '<br>' . $products[$i]['name'] . '</a>&nbsp;<span>' . $products[$i]['description'] .'<span>';
    but I don't know where to place it. Can anyone help me with this?

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

    Default Re: how do i show model # in shopping cart

    You could do a lookup for any additional field that you want based on:
    $products[$i]['id']

    But you may need to write a function to do so ...
    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 2006
    Posts
    9
    Plugin Contributions
    0

    Default Re: how do i show model # in shopping cart

    It works If you go to includes/template_default/templates/tpl_shopping_cart_default.php and find line 159 thru 163. It should start with "$product_name" and end with "<span>';". If you replace that code with the one listed above your customers will then see the mobel number in the shopping cart. Thanks all you guys are great!

  4. #4
    Join Date
    Aug 2004
    Location
    Fountain Hills, AZ
    Posts
    515
    Plugin Contributions
    1

    help question Re: how do i show category name in shopping cart

    I would like to display the category name just before the product name instead of the model #. Any suggestions? I looked at the code, but this one doesn't quite jump out at me.

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

    Default Re: how do i show model # in shopping cart

    The easiest method is to use a function ...

    Oh lookie a handy dandy function built into Zen Cart ...

    PHP Code:
    echo zen_get_categories_name_from_product($product_id); 
    Where $products_id would be the Product products_id based on where you are when you use it ...

    On the shopping_cart that would be:
    $products[$i]['id']

    PHP Code:
    echo zen_get_categories_name_from_product($products[$i]['id']); 
    Now just stick that somewhere nice in 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!

  6. #6
    Join Date
    Aug 2004
    Location
    Fountain Hills, AZ
    Posts
    515
    Plugin Contributions
    1

    Default Re: how do i show model # in shopping cart

    thanks a bunch. I knew there should be a function already set for pulling the category name but I hadn't had a chance to go through the general functions to see what I could find -

    I want to add it between the image and the Item name referring to it as "Item Type, so this should be tricky on the layout. Fortunately this site is a 100% layout and offers a bit more space in the cart area.

    I'll try your code and let you know how it works out.

    Once again.. Linda has the answer!!

    Thanks

 

 

Similar Threads

  1. How du I get the "model number" to show in the shopping cart??
    By Petlife in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 15 Jul 2011, 05:37 AM
  2. Replies: 2
    Last Post: 24 May 2010, 04:40 PM
  3. Show comments field below shopping cart if cart contains certain product model
    By frank18 in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 9 Feb 2010, 11:37 AM
  4. Code to show model number in shopping cart?
    By bugyoutoo in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 14 Mar 2008, 07:17 AM
  5. How to Add Model # to Shopping Cart Page
    By voltage in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 13 Oct 2006, 07:19 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