Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: Forward past the category page to the product page  (Read 20067 times)

Offline DavidLIR

  • Jr. Member
  • **
  • Posts: 86
  • Karma: +7/-0
    • View Profile
    • Love is Real
Re: Forward past the category page to the product page
« Reply #15 on: January 28, 2014, 08:56:08 PM »
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,
Love is Real....All Else is Illusion

Offline mesm

  • Newbie
  • *
  • Posts: 3
  • Karma: +1/-0
    • View Profile
Re: Forward past the category page to the product page
« Reply #16 on: February 15, 2014, 05:20:38 AM »

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';
            }

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';
                }

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;
        }

Can anyone help with the decision, according to the example?

 

Powered by SMFPacks Social Login Mod