Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Can I make a category link directly into a product detail?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-27-2006, 07:11 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default 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
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #2  
Old 07-28-2006, 03:33 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Why not just hard-code the category menu to link right to the product detail page?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 07-28-2006, 04:08 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default

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...
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #4  
Old 07-28-2006, 04:12 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Ahh...in that case, try this:

http://forum.x-cart.com/viewtopic.php?t=3020
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 07-28-2006, 04:33 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default

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
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #6  
Old 07-28-2006, 04:35 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default

or

http://forum.x-cart.com/viewtopic.php?t=30599
__________________
xcartmods.co.uk
Reply With Quote
  #7  
Old 07-28-2006, 05:14 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default

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.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #8  
Old 07-28-2006, 05:17 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

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
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #9  
Old 07-28-2006, 05:33 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default

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
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:04 AM.

   

 
X-Cart forums © 2001-2020