Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Mar 2007
    Posts
    86
    Plugin Contributions
    0

    Idea or Suggestion Disable drill down to single product

    Hi everybody,

    can any one help me on this. It's an easy question but the answer may not be. I want to disable the feature for drilling down from catagories to the individual product i.e. when a custome clicks on catagories on the main page they are directed to the product list for that catagorie and cannot click to go deeper than this. From here they can select the number of items oer product and add selected items to their cart. This is for our wholesale customers only. The skeleton of the site is here. Also would need for any NEW for month product listings to direct them to that catagorie.

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

    Default Re: Disable drill down to single product

    Is the whole site for wholesale customers, or do you want different behavior for logged-in wholesale customers and all others?
    If the latter, it should be possible but decidedly more complex coding required.

    If the former, what you would want is to disable the "more info" and title/image links in product listings. This should be a relatively simple matter to do, but from my memory of a year ago, could take a while to find the right files to edit.

    You would need to repeat at least some of this process for each type of listing you want to use (featured, new, all, specials & maybe search).

  3. #3
    Join Date
    Mar 2007
    Posts
    86
    Plugin Contributions
    0

    Default Re: Disable drill down to single product

    Hi Glenn
    The first option. We already have a Zen cart site for retail Customers here so the new site would be only for wholesale. I am new to Zen cart and for that matter PHP, CSS but I am a fairly quick study when needed!! If you can point me in the right direction as to what files need to be edited and in what way I would be very gratefull. I have an idea that it is just a case of disabling the links from sub catagories as you pointed out but on this I need a wee bit of help.


    Thank you for the help so far and the vey quick reply

  4. #4
    Join Date
    Mar 2007
    Posts
    86
    Plugin Contributions
    0

    Default Re: Disable drill down to single product

    Hi

    I have figured out how I can use the zen cart catagories and sub-catagories to do what I need. My only gripe is that on the listing page I cannot click on an image to get a larger image without drilling down to that specific products page. Is there a way of setting this up in admin because I have searched everywhere in admin without, obviously, any success.

    Thanks

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

    Default Re: Disable drill down to single product

    In tpl_product_info_display.php, there is code around the main image display that calls in the popup function. You could probably transplant that to product_listing.php, in the "image" case section. You will have to be sure you get enough code and not too much.

  6. #6
    Join Date
    Mar 2007
    Posts
    86
    Plugin Contributions
    0

    Default Re: Disable drill down to single product

    Don't know what I did wrong here but it does nothing. Sorry but my PHP skills are not very good. This is the code from product_listing.php with the transposed code from tpl.product_info_display.php. What have I done wrong.


    PHP Code:
       case 'PRODUCT_LIST_IMAGE':
            
    $template->get_template_dir('/tpl_modules_additional_images.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_additional_images.php';
            
    $lc_align 'center';
            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_WIDTHIMAGE_PRODUCT_LISTING_HEIGHT'class="listingProductImage"') . '</a>';
              } else {
                
    $lc_text '<a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), ($_GET['cPath'] > 'cPath=' $_GET['cPath'] . '&' '') . 'products_id=' $listing->fields['products_id']) . '">' zen_image(DIR_WS_IMAGES $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTHIMAGE_PRODUCT_LISTING_HEIGHT'class="listingProductImage"') . '</a>';
              }
            }
            break;
          }
          
    $list_box_contents[$rows][$col] = array('align' => $lc_align,
                                                  
    'params' => 'class="productListing-data"',
                                                  
    'text'  => $lc_text); 

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

    Default Re: Disable drill down to single product

    You have gotten the additional images code, not the main product image code.
    If the product has no additional images this will happily do nothing.

    Also, you will need to comment out the listing image code so you don't get two images. I think you would be safe disabling the entire "if" statement, leaving nothing between

    $lc_align = 'center';

    and

    break;

  8. #8
    Join Date
    Mar 2007
    Posts
    86
    Plugin Contributions
    0

    Default Re: Disable drill down to single product

    Given up on this for now. It does not work and it seems to be something a lot of people are requesting in the forums. Pity. last code tried below.

    PHP Code:
    case 'PRODUCT_LIST_IMAGE':
            
    $template->get_template_dir('/tpl_modules_main_product_image.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_main_product_image.php';
            
    $lc_align 'center';
              {
                
    $lc_text '<a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), ($_GET['cPath'] > 'cPath=' $_GET['cPath'] . '&' '') . 'products_id=' $listing->fields['products_id']) . '">' zen_image(DIR_WS_IMAGES $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTHIMAGE_PRODUCT_LISTING_HEIGHT'class="listingProductImage"') . '</a>';
              }
            break;
          }
          
    $list_box_contents[$rows][$col] = array('align' => $lc_align,
                                                  
    'params' => 'class="productListing-data"',
                                                  
    'text'  => $lc_text);
        } 

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

    Default Re: Disable drill down to single product

    I said to remove everything between $lc_align = 'center'; and break;

    The orphan { $lc_text... } would cause a problem if nothing else does.

    I'll have a look at tpl_modules_main_product_image.php and see if I spot any obvious problems there. I'm not sure if it will properly recognize the product to be displayed in its new location - might require some of the listing image definition code.

  10. #10
    Join Date
    Nov 2006
    Posts
    14
    Plugin Contributions
    0

    Default Re: Disable drill down to single product

    I too have the same requirement as rottijoe - you can see where I have gotten so far at: http://www.monbijouusa.com/shop/inde...ndex&cPath=1_2

    I have managed to get a pop up window to work on the image but I haven't figured out how to control the pop up image or the size and look of the pop up window.

    PHP Code:
    case 'PRODUCT_LIST_IMAGE':
            
    $lc_align 'center';
            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(FILENAME_POPUP_IMAGE'pID=' $listing->fields['products_id']) . '" target="_blank">' zen_image(DIR_WS_IMAGES $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTHIMAGE_PRODUCT_LISTING_HEIGHT'class="listingProductImage"') . '</a>';
              } else {
                
    $lc_text '<a href="' zen_href_link(FILENAME_POPUP_IMAGE'pID=' $listing->fields['products_id']) . '" target="_blank">' zen_image(DIR_WS_IMAGES $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTHIMAGE_PRODUCT_LISTING_HEIGHT'class="listingProductImage"') . '</a>';
              }
            }
            break; 
    I took the href link from tpl_modules_main_product_image.php
    I think if the javascript from this page can be modified for use in product_listing.php the pop up would work properly - but I can't get this script to work:
    PHP Code:
    <script language="javascript" type="text/javascript"><!--
    document.write('<?php echo '<a href="javascript:popupWindow(\\\'' zen_href_link(FILENAME_POPUP_IMAGE'pID=' $_GET['products_id']) . '\\\')">' zen_image($products_image_mediumaddslashes($products_name), MEDIUM_IMAGE_WIDTHMEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' TEXT_CLICK_TO_ENLARGE '</span></a>'?>');
    //--></script>
    Have to go to sleep now - I am hoping a zen good fairy can finish what I have started.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Drill down search on drop down form
    By DaMixa in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 3 Jul 2011, 09:01 AM
  2. Unable to drill-down into any product
    By mykrix in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 12 Mar 2010, 09:53 PM
  3. Add New Product - Way to drill down into Image subfolders?
    By Scarpine in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 5 Feb 2009, 08:51 PM
  4. Ccategories disappear from drill-down
    By FrenchFrog in forum General Questions
    Replies: 0
    Last Post: 25 Jul 2008, 10:56 PM

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