X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Can I make a category link directly into a product detail? (https://forum.x-cart.com/showthread.php?t=23641)

carpeperdiem 07-27-2006 07:11 PM

Can I make a category link directly into a product detail?
 
Can I make a category menu item link directly into a product detail page?

Let's say I have 2 categories + 1 individual product, that I want to treat as MAJOR PRODUCT item...

CATEGORY 1 ==> Category 1 page (actually products.tpl)
CATEGORY 2 ==> Category 2 page (actually products_t.tpl)
MAJORPRODUCT1 (disguised as a category) ==> I WANT THIS TO link right to product.tpl

Can this be done?

I own the WebsiteCM "multiple product and category templates bundle" (which is great)... but this function is outside the scope of that mod.

My goal is to make the products.tpl think it's product.tpl. Using the WebsiteCM tools, it's very easy to assign a new/modified tpl file to a specific category.

SO, let's say that I were to clone "products.tpl", call it "products-majorproduct1.tpl" -- and of course assign it to the "category" MAJOR PRODUCT1 -- what exactly can I do to this to make it behave as if it were a product detail page?

Is there a shortcut or hidden trick?

I have searched the forum for this - but nobody seems to have done this in public...

Your expertise is appreciated.

Thanks,

Jeremy

balinor 07-28-2006 03:33 AM

Why not just hard-code the category menu to link right to the product detail page?

carpeperdiem 07-28-2006 04:08 AM

Quote:

Originally Posted by balinor
Why not just hard-code the category menu to link right to the product detail page?

Padraic,

Don't forget that I'm still a newbie... I have mastered many parts of the code, but there are many concepts that I don't have a clue...

In this case, I purchased PhilJ's True Three Level Vertical Category Flyout Menu -- so I've added a layer of complexity (maybe not?)

If you were going to hard code a specific product.tpl (let's say I rename it product-majorproduct1.tpl) - where would you start? Would the code look like an if/else -- ?

SInce I have disabled /skin1/customer/categories.tpl, my code may need to be different, but not THAT different.

Let's say you were going to hard code a product detail page into a "stock" categories.tpl --
Code:

{* $Id: categories.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *}
<div id="categories">
{capture name=menu}
{if $active_modules.Fancy_Categories ne ""}
{include file="`$fancycategories_config.modules_path`/fancy_categories.tpl"}
{else}
{if $config.General.root_categories eq "Y"}
{section name=cat_num loop=$categories}
<FONT class="CategoriesList">&raquo; {$categories[cat_num].category}</FONT>
{/section}
{else} {section name=cat_num loop=$subcategories}
<FONT class="CategoriesList">&raquo; {$subcategories[cat_num].category}</FONT>
{/section}
{/if}
{/if}
{/capture}
{ include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu }
</div>

Where do we edit?

Surely someone has done this??? What do stores that only sell a few products do? Do they always require the customer to click on a category (thumbnail) page before getting to the product detail? Unfortunately, many xcart stores do this -- in my opinion, a speedbump for the customer.

Thanks for pointing me in a direction...

balinor 07-28-2006 04:12 AM

Ahh...in that case, try this:

http://forum.x-cart.com/viewtopic.php?t=3020

carpeperdiem 07-28-2006 04:33 AM

Quote:

Originally Posted by balinor
Ahh...in that case, try this:

http://forum.x-cart.com/viewtopic.php?t=3020

Thanks... it looks like there was a solution for 3.x but the fix is broken in 4.x -- the thread just died more than a year ago...

I may have to take this to xcart support -- I can't BELIEVE this is not a common feature that many, many merchants want/need! How many merchants (manufacturers) have a new or featured product that they want front and center - and of course, we make a featured product for it (only useful on the home page) -- but we also want it to be the first category slot, and avoid the "speedbump" of a category page (products.tpl).

I have emailed and PM'd a few forum members, maybe the brain trust will have an idea?

Thanks for the link.

Jeremy

PhilJ 07-28-2006 04:35 AM

or

http://forum.x-cart.com/viewtopic.php?t=30599

carpeperdiem 07-28-2006 05:14 AM

Phil,

That mod didn't work for me... :(

Hopefully, I'll stumble into a fix. I am still surprised that this isn't a "stock" option.

balinor 07-28-2006 05:17 AM

That's actually the mod I meant to point you to...sorry. It works on 4.0.18, as I've used it in the past.

Remember, there can only be so many 'stock options' in a product that costs $199 :)

carpeperdiem 07-28-2006 05:33 AM

It works! My bad.

The copy/paste on a mac sometimes adds whitespace when pasting into my preferred text editor (text wrangler)...

Thanks to a suggestion from PhilJ, I looked at the code and for whatever reasons, mr. macintosh dropped some extra spaces in to the lines (also when copying from a mac browser like Safari, all kinds of bad things happen at line breaks)

Re-formatting all the linebreaks and whitespace fixed this!

YEAH BABY!

Thank you!

Jeremy


All times are GMT -8. The time now is 01:46 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.