Results 1 to 9 of 9
  1. #1
    Join Date
    Oct 2012
    Posts
    282
    Plugin Contributions
    0

    Default Problem loading custom product_info templates from shopping cart default page

    Hi,
    i've created a custom product_info template for each product category in my clients ZC store.

    they load them no problem if the modules/pages/product_info/main_template_var.php file loads.

    but the problem is, from the shopping cart page, if clicking on a product link this file doesn't get called. the difference in the product display URLs are shown below.

    index.php?main_page=product_info&cPath=3_6&products_id=15
    index.php?main_page=product_info&products_id=15

    can anyone describe how i might be able get the cPATH info into the product links for the shopping cart page? or how to get that into the $products array var?

  2. #2
    Join Date
    Jul 2009
    Location
    picaflor-azul.com
    Posts
    6,930
    Plugin Contributions
    45

    Default Re: Problem loading custom product_info templates from shopping cart default page

    Quote Originally Posted by tcarden View Post
    Hi,
    i've created a custom product_info template for each product category in my clients ZC store.

    they load them no problem if the modules/pages/product_info/main_template_var.php file loads.

    but the problem is, from the shopping cart page, if clicking on a product link this file doesn't get called. the difference in the product display URLs are shown below.

    index.php?main_page=product_info&cPath=3_6&products_id=15
    index.php?main_page=product_info&products_id=15

    can anyone describe how i might be able get the cPATH info into the product links for the shopping cart page? or how to get that into the $products array var?
    Why don't you just use different product types? or just use one tpl_product_info_display.php file and customize using per category css?

    Thanks,

    Anne

  3. #3
    Join Date
    Oct 2012
    Posts
    282
    Plugin Contributions
    0

    Default Re: Problem loading custom product_info templates from shopping cart default page

    thanks, i have never really looked at product types, i will try that.

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

    Default Re: Problem loading custom product_info templates from shopping cart default page

    How different are the different category product displays? is it mostly a matter of style/layout, or are there significant structural or programmatic differences? The answer to this will indicate your probable best course of action. A CSS solution is likely to be far easier than others.

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

    Default Re: Problem loading custom product_info templates from shopping cart default page

    If programmatic differences are required, it may be easier to add tests for categories and choices based on that to the one tpl_product_info_display.php, similar to what happens in product_listing.php with the Column Grid mod.

  6. #6
    Join Date
    Oct 2012
    Posts
    282
    Plugin Contributions
    0

    Default Re: Problem loading custom product_info templates from shopping cart default page

    thanks for the response gjh42, i don't know what you mean by add tests,

    i doubt CSS only will work, there's been some extreme customizing but for good reasons.

    one product line is Belts (over 1000!) so the image fills the space horiz completely,

    maybe i'll just remove the link from shopping cart..?

  7. #7
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Problem loading custom product_info templates from shopping cart default page

    Quote Originally Posted by tcarden View Post
    Hi,
    i've created a custom product_info template for each product category in my clients ZC store.

    they load them no problem if the modules/pages/product_info/main_template_var.php file loads.

    but the problem is, from the shopping cart page, if clicking on a product link this file doesn't get called. the difference in the product display URLs are shown below.

    index.php?main_page=product_info&cPath=3_6&products_id=15
    index.php?main_page=product_info&products_id=15

    can anyone describe how i might be able get the cPATH info into the product links for the shopping cart page? or how to get that into the $products array var?
    There is a block of code that assembles the cpath. Either your link is not providing the value or the function is not being called when the link is clicked. PM or post a link so I can see the code in action please?
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base7 with Wholesale PRO - 88 preinstalled plugins zero errors.

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

    Default Re: Problem loading custom product_info templates from shopping cart default page

    tcarden - I was responding to Anne's response and forgetting your original request. There is a function to fetch a product's master category id given the product id, and another to get the full cPath from a category id. You could chain those to recreate the correct cPath for each product in the cart, and insert it into the link.
    I don't get a cPath in the link when I try a product in my shopping cart.

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

    Default Re: Problem loading custom product_info templates from shopping cart default page

    I think the reason the cPath is not in the link is because there is not a record of which category the product was added to cart from; in the case of a linked product, that would be unknown, so the link here defaults to the basic product page without reference to a category.

    If a product is in one category only, as yours likely are, there is no downside to including the cPath.

 

 

Similar Threads

  1. Replies: 0
    Last Post: 18 Jun 2012, 01:02 AM
  2. Remove right sidebox shopping cart from when on shopping cart page
    By alterego55 in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 2 Oct 2010, 01:45 AM
  3. Custom html_header.php for product_info page - How?
    By profitshock in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 28 Jun 2010, 09:58 PM
  4. Custom shopping cart page
    By mikedeezy33 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 10 Oct 2007, 11:27 PM
  5. Default Problem with shopping cart, contact us pages..
    By mohinder in forum General Questions
    Replies: 31
    Last Post: 20 Jul 2007, 01:09 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