Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Product description on main page

    To try to be sure it is understood, you aren't wanting category 1 to be displayed as the main page, but want your new product group, specials product group, etc. To have more information about each product. The solution to both of those is different as they are different issues. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #2
    Join Date
    Feb 2013
    Posts
    111
    Plugin Contributions
    2

    Default Re: Product description on main page

    yes but just the specials the new products will be removed from the front page

  3. #3
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Product description on main page

    If it is to "just" add the "abbreviated" description, you were spot on with the file to be modified:
    Includes/modules/YOUR_TEMPLATE/specials_index.php

    Once you have that file copied from the modules directory. You will want to find this set of code:
    Code:
    $list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsSpecials centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
        'text' => (($specials_index->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($specials_index->fields['products_id']), 'cPath=' . $productsInCategory[$specials_index->fields['products_id']] . '&products_id=' . (int)$specials_index->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $specials_index->fields['products_image'], $specials_index->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($specials_index->fields['products_id']), 'cPath=' . $productsInCategory[$specials_index->fields['products_id']] . '&products_id=' . $specials_index->fields['products_id']) . '">' . $specials_index->fields['products_name'] . '</a><br />' . $products_price);
    Somewhere in that stream of the 'text' part (second line) you will want to put the reference to the description using the function that truncates such text. (sorry haven't gone to find that "command" yet, but plan to do so unless you or someone else finds/found it sooner.)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Feb 2013
    Posts
    111
    Plugin Contributions
    2

    Default Re: Product description on main page

    If you could find it I'd be forever grateful PHP still scares me a bit hahaha

  5. #5
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Product description on main page

    From the product_listing.php file in the same directory, there is:

    Code:
    zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($specials_index->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION)
    The above code has been modified to support the $specials_index variable. The length of text is controlled by the constant PRODUCT_LIST_DESCRIPTION. I was going to try to use a specials equivalent, but there is not one by default in ZC which would require a sql command to install.

    So that code would have to be put in line with the 'text'=> line and possibly bounded by css applicable code or at least an ending <br />
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Show product description on main-page?
    By gustafr in forum Templates, Stylesheets, Page Layout
    Replies: 66
    Last Post: 13 Sep 2010, 12:19 PM
  2. how do you omit description of product on main product page?
    By rubis in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 29 Mar 2009, 04:25 PM
  3. Category Description on Main Page
    By jamesweiss225 in forum Basic Configuration
    Replies: 2
    Last Post: 1 Jan 2009, 08:17 PM
  4. Changing description on my main product page
    By 9800xl in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 28 Aug 2007, 05:03 PM
  5. Product Description Issues on main page
    By magneteye in forum General Questions
    Replies: 8
    Last Post: 20 Jul 2007, 10:04 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