Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2013
    Posts
    111
    Plugin Contributions
    2

    red flag Product description on main page

    Hi guys,

    I'm wondering if it's possible to add the products description to the main page or a cut down version to 300 characters maybe as a featured listing.

    I'm assuming it would require /includes/modules/featured_products.php being added to the overrides folder and then being edited I'm just not 100% sure how or where I would edit the file to do that.

  2. #2
    Join Date
    Jul 2012
    Posts
    16,719
    Plugin Contributions
    17

    Default Re: Product description on main page

    If understand the request correctly, I thought the plugin SNAF offered that capability of showing the specials, new, and featured product similar to how product listings are displayed. Haven't chased down the code for this answer, but it may also involve files in includes/templates/YOUR_TEMPLATE/templates

    such as tpl_modules_featured.php, or tpl_featured.php or similarly named.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

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

    Default Re: Product description on main page

    I've read up I don't think that does cover it.

    Basically I want it to appear with a description like this

    Small Dog Full Groom
    Small Dog Full Groom Here at The Temple of Groom we offer Small Dog Grooming located in Seaton Delaval. Seaton Delaval is only a few short...
    Contact Us

    as seen here

    http://thetempleofgroom.uk/index.php...=index&cPath=1

    But on the front page

    http://thetempleofgroom.uk/

  4. #4
    Join Date
    Jul 2012
    Posts
    16,719
    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...

  5. #5
    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

  6. #6
    Join Date
    Jul 2012
    Posts
    16,719
    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...

  7. #7
    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

  8. #8
    Join Date
    Jul 2012
    Posts
    16,719
    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...

  9. #9
    Join Date
    Feb 2010
    Location
    Syracuse, NY
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Product description on main page

    Quote Originally Posted by vvomble View Post
    I've read up I don't think that does cover it.

    Basically I want it to appear with a description like this

    Small Dog Full Groom
    Small Dog Full Groom Here at The Temple of Groom we offer Small Dog Grooming located in Seaton Delaval. Seaton Delaval is only a few short...
    Contact Us

    as seen here

    http://thetempleofgroom.uk/index.php...=index&cPath=1

    But on the front page

    http://thetempleofgroom.uk/

    Flexible NSF (New, Specials & Featured) Center-boxes

 

 

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

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