Shopping Cart Operations > Tips and Tricks
Forward past the category page to the product page
DavidLIR:
Just a little update to show you what I have done to work with this...I found that the controller for the blocks/category seems to be taking from both the Menu items and the category items. Check out loveisreal-believe.com Just above the slider banner I used that block and if you mouse over the home tab you will see that it works just as I wanted it to work...each link goes directly to the product page...however if you chose any of the three other tabs Apparel, Totes & Bags, Misc those will go to a category page...For those who understand code, which I don't, it seems like some of the code is there to do it...but it seems to be pulling from two different areas?
I will tell you how I did it. I created the drop downs under the home tab under design/menu. and I added the external link for the product page for the direct link to each product page... for that dropdown tab...
example for the menu item Products/T-shirts/Ladies T-Shirts I put the external link http://loveisreal-believe.com/store/t-shirts/ladies-t-shirt
I would appreciate some feedback on this...Thanks,
mesm:
This is the solution from another system, but the code is almost identical.
Code:
--- Quote ---if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/category.tpl')) {
$this->template = $this->config->get('config_template') . '/template/product/category.tpl';
} else {
$this->template = 'default/template/product/category.tpl';
}
--- End quote ---
Replace with this:
--- Quote --- $this->data['continue'] = $this->url->link('common/home');
if (!isset($this->request->get['route']) || (isset($this->request->get['route']) && (isset($this->request->get['path']) && $this->request->get['path']==='61_73' ))){
$this->redirect($this->url->link('product/product&path=61_73&product_id=58', '', 'SSL'));
}else if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/category.tpl')) {
$this->template = $this->config->get('config_template') . '/template/product/category.tpl';
} else {
$this->template = 'default/template/product/category.tpl';
}
--- End quote ---
This is the code in public_html\core\lib\template.php - Line 33:
--- Quote --- if (file_exists(DIR_TEMPLATE . $this->config->get('config_storefront_template') . '/template/'. $filename)) {
$filename = $this->config->get('config_storefront_template') . '/template/'. $filename;
} else {
$filename = 'default/template/'. $filename;
}
--- End quote ---
Can anyone help with the decision, according to the example?
Navigation
[0] Message Index
[*] Previous page
Go to full version