Results 1 to 9 of 9
  1. #1
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Turning product info pages off?

    A friend of mine is considering ZC for his online ordering system. He does not need/want the detailed product info pages for some of his categories, ie no links to the details but just the index listing with a qty box for the categories in question including the usual "add selected products to cart" button.

    How can this be achieved?

    Sorry, no link to the site available, store being developed locally.

    Thanks / Frank

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Turning product info pages off?

    ould require custom coding if/else for those categories
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Turning product info pages off?

    Quote Originally Posted by kobra View Post
    ould require custom coding if/else for those categories
    Thanks kobra, I thought so...

    Which files would be affected to process the relevant index listings?

  4. #4
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Turning product info pages off?

    I believe the file to be modified with if/else is
    /includes/modules/product_listing.php
    would I be on the right track?

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Turning product info pages off?

    Correct, and you should copy it to /includes/modules/your_template/product_listing.php before editing so the changes stay safe.

  6. #6
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Turning product info pages off?

    Quote Originally Posted by gjh42 View Post
    Correct, and you should copy it to /includes/modules/your_template/product_listing.php before editing so the changes stay safe.
    Thanks Glenn - I will have a play with this on my local machine over the weekend

    Frank

  7. #7
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Turning product info pages off?

    My solution:

    Backup, Backup, Backup ...

    Copy file includes/modules/product_listing.php to includes/modules/YOUR_TEMPLATE/product_listing.php

    Caution: many templates may already use a template specific file product_listing.php !! So, create another backup of this file..


    Open the copied file and create variable for categories to disable link to product details

    $disable_productlinks_cPath = "61,64,65,66,68,68,78,93";
    change this

    case 'PRODUCT_LIST_NAME':
    $lc_align = '';
    if (isset($_GET['manufacturers_id'])) {
    $lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3> (... rest of code omitted....);
    to this

    case 'PRODUCT_LIST_NAME':
    $lc_align = '';
    if (in_array($cPath,explode(',', $disable_productlinks_cPath)) ) {
    $lc_text = '<h3 class="itemTitle">' . $listing->fields['products_name'] . '</h3> (.... rest of code omitted ....);
    Then to control the images and their links (if images are not already turned off globally in admin)

    change this

    if ($listing->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) {
    $lc_text = '';
    } else {
    if (isset($_GET['manufacturers_id'])) {
    $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>';
    to this

    if ($listing->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) {
    $lc_text = '';
    } else {
    if (in_array($cPath,explode(',', $disable_productlinks_cPath)) ) {
    $lc_text = '';
    Need to work on disabling the column header 'Product Image' for categories affected.

    It goes without saying that individual product detail pages still need to be created albeit with a much shorter description

    Frank

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Turning product info pages off?

    Need to work on disabling the column header 'Product Image' for categories affected.


    There has been discussion of doing this kind of thing a couple of years back. It was specifically for including one element under another element's heading (and eliminating the cell for the first one). A key element is tricking the loop into believing it has done enough iterations to fill the correct number of cells.

  9. #9
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Turning product info pages off?

    Yeah, Glenn, that sounds like the real deal.

    Anyway, did this little exercise for my mate and he is quite happy with the result. He is considering to show some images on the index pages but without the link to detail - easy fixed with a little tweak.

    Thanks again to all for the hints and tips, might help someone to achieve something similar in the future.

    Frank

 

 

Similar Threads

  1. turning off sideboxes on checkout pages
    By GRRB in forum Templates, Stylesheets, Page Layout
    Replies: 25
    Last Post: 20 May 2010, 04:27 PM
  2. Turning off columns on selected pages
    By red8ii8 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 28 Mar 2007, 11:23 PM
  3. Turning off New Product display inside pages
    By cshart in forum General Questions
    Replies: 2
    Last Post: 12 Sep 2006, 12:34 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