Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2014
    Posts
    20
    Plugin Contributions
    0

    Default Changing the display order of item name/description/image/price in centerboxes?

    Hi, I am trying to figure out how to change the display order of the item name/description/image/price in the new and featured item centerboxes. My product listing is in a grid pattern and each item displays in this order: picture/name/description/price/add to cart button. The new items and featured items centerboxes display in this order: name/picture/price/product details button. I would like these centerboxes to display the picture first before the name in order to keep uniformity.

    I've tried using developers tool kit to figure out what to edit and have been going around in circles for more than a week now so I'm desperate. Please help!

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

    Default Re: Changing the display order of item name/description/image/price in centerboxes?

    This sounds like changes in your templates and overrides for:
    /includes/modules/your_template_dir/new_products.php

    By default, they display as:
    Image
    Product Name
    Price

    The default code reads:
    Code:
      while (!$new_products->EOF) {
        $products_price = zen_get_products_display_price($new_products->fields['products_id']);
        if (!isset($productsInCategory[$new_products->fields['products_id']])) $productsInCategory[$new_products->fields['products_id']] = zen_get_generated_category_path_rev($new_products->fields['master_categories_id']);
    
        $list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
        'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><br />' . $products_price);
    
        $col ++;
        if ($col > (SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS - 1)) {
          $col = 0;
          $row ++;
        }
        $new_products->MoveNextRandom();
      }
    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!

  3. #3
    Join Date
    Oct 2014
    Posts
    20
    Plugin Contributions
    0

    Default Re: Changing the display order of item name/description/image/price in centerboxes?

    YESSSSS! Thank you so much! You just helped me remove the biggest splinter in my paw!

    For anyone trying to fix the same issue, here's how I moved the code around to resort the display order:
    Code:
    $list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew"' . ' ',
    					     'text' => (($featured_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<div class="box_image"><a href="' . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'cPath=' . $productsInCategory[$featured_products->fields['products_id']] . '&products_id=' . $featured_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $featured_products->fields['products_image'], $featured_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a></div>') . '<div class="product_title"><a href="' . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'cPath=' . $productsInCategory[$featured_products->fields['products_id']] . '&products_id=' . $featured_products->fields['products_id']) . '">' . $featured_products->fields['products_name'] . '</a></div>' . '<div class="price">'.$products_price.'</div>'.'<div class="product_detail"><a href="'. zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'cPath=' . $productsInCategory[$featured_products->fields['products_id']] . '&products_id=' . $featured_products->fields['products_id']) . '">' .zen_image_button(BUTTON_IMAGE_GOTO_PROD_DETAILS , BUTTON_GOTO_PROD_DETAILS_ALT).'</a></div>');

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

    Default Re: Changing the display order of item name/description/image/price in centerboxes?

    Thanks for the update that you were able to change these ...
    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!

 

 

Similar Threads

  1. Change Item Name and Price colour without changing product titles
    By luvvvvvit in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 29 Sep 2011, 02:32 PM
  2. Need help trying to switch order for display (qty, item name, price)...
    By BenhamCollectibles in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 5 Dec 2009, 05:59 PM
  3. Changing the Colour of Price & Item Name LinKS
    By Best Price Accessori in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 29 Nov 2009, 12:57 PM
  4. Changing Item Name & Description information on cat listing page?
    By KismetDesign in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 11 Oct 2009, 05:06 AM
  5. Category view: changing product display column width - image, description, price?
    By azenuser in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 8 Feb 2007, 10:31 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