X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Make "Specifications" the Default Tab (https://forum.x-cart.com/showthread.php?t=73653)

2ndTracks 02-29-2016 02:50 PM

Make "Specifications" the Default Tab
 
Does anyone know how I might go about making "Specifications" the default tab that opens on a product page? I always write my descriptions in the brief field and sell products that have lots of specs.

It would be nice if they were easily visible, especially because I don't put anything in the default description field.

totaltec 02-29-2016 04:38 PM

Re: Make "Specifications" the Default Tab
 
Ben,
I'm sure this could be accomplished by creating a custom module, or adding on to your existing custom module. You would be able to use the move templates in lists function and adjust the order.

razortw 03-01-2016 01:03 PM

Re: Make "Specifications" the Default Tab
 
Quote:

Originally Posted by 2ndTracks
Does anyone know how I might go about making "Specifications" the default tab that opens on a product page? I always write my descriptions in the brief field and sell products that have lots of specs.

It would be nice if they were easily visible, especially because I don't put anything in the default description field.

Hi.
Find the defineTabs() function in classes/XLite/View/Product/Details/Customer/Page/APage.php and swap the following lines of code
Code:

        $this->defineDescriptionTab($list);
        $this->defineSpecificationTab($list);

That will do the trick.

But of course, I recommend you to create a module that would override the defineTabs() function with your own modified code, otherwise your change will be overwritten during an upgrade.
For more info on how to create a module check out developer docs
* http://kb.x-cart.com/display/XDD/Step+1+-+creating+simplest+module


All times are GMT -8. The time now is 11:16 AM.

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