Page 1 of 2 12 LastLast
Results 1 to 10 of 20
  1. #1
    Join Date
    Mar 2009
    Location
    Essex, UK
    Posts
    446
    Plugin Contributions
    0

    Default How to set up sub-category to instead go onto the first product

    Hi

    I have a question which is a bit outside the box. Basically we sell several ranges of desks. In each range there are small differences for the same product, for example crank option, motorised adjustment, frame only etc. Desks are either deluxe, professional or economical.

    The person I work for wants to override the product listings and instead choose to show the first product of that category. Now I know this is not straightforward (and the person is adamant this is what he wants).

    We have categories, sub-categories and product listings, so my question is can this be achieved with code? Even by category id?

    I know basic PHP and can follow good instruction so would appreciate any guidance.

    Many thanks
    Debbie Harrison
    DVH Design | Web Design blog

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

    Default Re: How to set up sub-category to instead go onto the first product

    Can you explain a little more about what constitutes a category?

    Are you using product attributes to describe/define the product such that these "little" differences can be applied directly to the product in front of the customer?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Mar 2009
    Location
    Essex, UK
    Posts
    446
    Plugin Contributions
    0

    Default Re: How to set up sub-category to instead go onto the first product

    Quote Originally Posted by mc12345678 View Post
    Can you explain a little more about what constitutes a category?
    Ok like for instance we have Express category that consists of: ergonomic desks, ergonomic classroom desks and chairs.

    Choosing ergonomic desks, you have the option to choose the range: Deluxe, Professional and Economical

    If say we choose economical, instead of then seeing the product listings, he would like the first product page to come up instead.

    I should point out, that we already have links in place on the page to the other products in the category.

    Quote Originally Posted by mc12345678 View Post
    Are you using product attributes to describe/define the product such that these "little" differences can be applied directly to the product in front of the customer?
    We already have attributes for each desk (top size, finishes, etc) but some of the product in the range aren't related. For example even though they are Express Desks, they are different brand names and are priced differently.
    Debbie Harrison
    DVH Design | Web Design blog

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

    Default Re: How to set up sub-category to instead go onto the first product

    So guess a little confused? If say this "last" category is selected, the desire is to show "a" product, but how is one expected to get to *each* product?

    If all that is desired is to have the category show an image, there is the ability to have a sort of category description/image displayed at the top with the product list below.

    Guess trying to understand the desired condition still to offer appropriate advice. Anything is possible.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Mar 2009
    Location
    Essex, UK
    Posts
    446
    Plugin Contributions
    0

    Default Re: How to set up sub-category to instead go onto the first product

    Quote Originally Posted by mc12345678 View Post
    So guess a little confused? If say this "last" category is selected, the desire is to show "a" product, but how is one expected to get to *each* product?

    If all that is desired is to have the category show an image, there is the ability to have a sort of category description/image displayed at the top with the product list below.

    Guess trying to understand the desired condition still to offer appropriate advice. Anything is possible.
    Hi I can show you a test site is that helps. The product page as it stands is http://dvhdesign.co.uk/sd/economic-h...desk-p-49.html

    The icons on the left all link to the other product pages.

    I know its a crazy setup, (Believe me, I have echoed this).
    Debbie Harrison
    DVH Design | Web Design blog

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

    Default Re: How to set up sub-category to instead go onto the first product

    Okay, so because of my screen "resolution" I didn't have a left side link on which to click. The specific product that is shown at the above link, that appears to be a "standard" product info page. (I say standard in quotes because I didn't go look at the source code to see if there were any tells of it being ZC.) The template used is responsive/mobile and there are all the things of a product with attributes displayed. When/if I used the crumbs links, I was taken to a product listing page that offered information about the list of products (4 in this case or 1 of 4 I think it was).

    So, I'm not seeing what is offered at that site that isn't easily available on any other ZC site. Perhaps a link to the existing site of the area to be changed and words (or a picture) to explain what is desired to be different.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Mar 2009
    Location
    Essex, UK
    Posts
    446
    Plugin Contributions
    0

    Default Re: How to set up sub-category to instead go onto the first product

    Quote Originally Posted by mc12345678 View Post
    Okay, so because of my screen "resolution" I didn't have a left side link on which to click. The specific product that is shown at the above link, that appears to be a "standard" product info page. (I say standard in quotes because I didn't go look at the source code to see if there were any tells of it being ZC.) The template used is responsive/mobile and there are all the things of a product with attributes displayed. When/if I used the crumbs links, I was taken to a product listing page that offered information about the list of products (4 in this case or 1 of 4 I think it was).

    So, I'm not seeing what is offered at that site that isn't easily available on any other ZC site. Perhaps a link to the existing site of the area to be changed and words (or a picture) to explain what is desired to be different.
    There's no point directing you to the live site, as a lot has changed including this new setup.



    We don't want to see the product listings. Instead we would like to see the product page for that first product in the list. In this case http://dvhdesign.co.uk/sd/economic-h...desk-p-49.html

    I'm intrigued as what setup you have. Please could you inform me?
    Debbie Harrison
    DVH Design | Web Design blog

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

    Default Re: How to set up sub-category to instead go onto the first product

    Okay, so there may be a better way to do this, but what I seemed to find was the following based on some of the discussion.

    Want to be able to navigate from category to category and see the "sub-categories" in the center of the page, but... When reaching a category that has product (which in ZC in default coding is the way things are expected to be either a category has active product or other sub-categories but not both active product and sub-categories), then display product "0" for that category which is likely to be based on some sort of sort operation...

    I didn't chase down every possibility, and there are "cleaner" ways to do this than to literally change code like to use a notifier/observer operation, but during testing a little code mod first could make the difference/easier. :)

    Anyways, so that full process is controlled by the includes/modules/pages/index/ code in that folder basically..

    When one navigates to/through the categories or back to the main (default) screen, then the code in this area is evaluating the conditions to see what page (listing) should be displayed...

    In your case, when a visitor tries to arrive at this "last page", you would like them diverted to the product that would have appeared first on that page... So... here's my thought, which does involve modifying a "non-overrideable" file...

    If you open includes/modules/pages/index/main_template_vars.php and then at/around line 196: $tpl_page_body = 'tpl_index_product_list.php';

    And just before or just after this, if you add this line which comes from includes/modules/pages/index/header_php.php:

    Code:
    zen_redirect(zen_href_link(zen_get_info_page($listing->fields['products_id']), ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing->fields['products_id']));
    Then this is likely to at least *prove* the theory. The next thing would be to ensure that the particular products_id is provided/available if in fact some sort order was applied, but this should redirect to the first item of the return list.

    Please try this on your local development site.

    As to my "setup". If you mean how am I navigating to see things currently, well, good ole' blackberry... :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #9
    Join Date
    Mar 2009
    Location
    Essex, UK
    Posts
    446
    Plugin Contributions
    0

    Default Re: How to set up sub-category to instead go onto the first product

    Thanks mc, that is much appreciated. Will try what you suggested on my test site on Monday.

    As to my "setup". If you mean how am I navigating to see things currently, well, good ole' blackberry... :)
    You have more patience than me, I gave up on BlackBerry ages ago.
    Debbie Harrison
    DVH Design | Web Design blog

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

    Default Re: How to set up sub-category to instead go onto the first product

    Quote Originally Posted by dharrison View Post
    Thanks mc, that is much appreciated. Will try what you suggested on my test site on Monday.



    You have more patience than me, I gave up on BlackBerry ages ago.
    Darn, I was hoping to hear back on how it worked out sooner. Guess I'd have to try it myself to see before then.

    I was fortunate that I had a good enough device when I started to need it, and now things are even better. I can download and manipulate zip files, can access github and have multiple browser windows open. The only thing I don't have is proper ftp access. Webftp is possible with particular servers, but want to talk about having to be patient... oye...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. How to i set attributes to all the items in a sub category?
    By toutou21 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 5 Feb 2010, 12:18 AM
  2. How to make top category to show products instead of sub-categories?
    By MKdiable in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 12 Oct 2009, 11:55 PM
  3. Default to the first sub category
    By odessey1 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 1 Jul 2009, 03:38 AM
  4. Product always first in category - how do I set that up?
    By abran1984 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 4 Dec 2008, 06:04 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