Not for official support
We do not provide technical support in this forum.
If you want to contact our customer support, please use our support form.

You are not logged in.

#1 2012-04-09 11:34

brianz
Member

Test a theme

Is there a way to test whether a new theme is functioning correctly without setting it as the storefront?

Offline

 

#2 2012-04-10 01:39

rat
Administrator

Re: Test a theme

Click on Theme preview on the themes listing page.


Be careful what you wish for — you might get it.

Offline

 

#3 2012-04-10 09:00

brianz
Member

Re: Test a theme

The theme preview doesn't seem to show whether the links function correctly, do I have something set up wrong?

Offline

 

#4 2012-04-10 09:32

rat
Administrator

Re: Test a theme

What links do you want to test?


Be careful what you wish for — you might get it.

Offline

 

#5 2012-04-10 10:32

brianz
Member

Re: Test a theme

The categories, info pages, product lists, etc. Also how would I make two separate category trees?

Last edited by brianz (2012-04-11 09:52)

Offline

 

#6 2012-04-12 02:08

rat
Administrator

Re: Test a theme

1. I suggest that make a copy of your website and move it to your local computer for testing. That is where you can change the main theme at any time and later apply changes to the live website.

2. Modify the code of method cpt_category_tree in file published/SC/html/scripts/modules/test/class.test.php as shown below:

Code:

function cpt_category_tree($call_settings = null){
    $Register = &Register::getInstance();
    $smarty = &$Register->get(VAR_SMARTY);
    /*@var $smarty Smarty*/

    if(!is_array($smarty->get_template_vars('categories_tree'))){
        $this->methodCategoryTree();
    }

    $local_settings = isset($call_settings['local_settings'])? $call_settings['local_settings']:array();
    $smarty->assign ('extra', isset ($local_settings['tree'])? ($local_settings['tree'] == 'extra') : false);

    print $smarty->fetch('category_tree.html');
}

Then add the following snippet to the desired template where you want to display an extra category tree:

Code:

{cpt_category_tree tree='extra'}

and add the following conidition to file published/SC/html/scripts/templates/frontend/category_tree.html:

Code:

{if $extra}
extra category tree here
{else}
main category tree here
{/if}

You will have to write your own Smarty code in published/SC/html/scripts/templates/frontend/category_tree.html to determine what categories need to be included in either tree.


Be careful what you wish for — you might get it.

Offline

 

Board footer

Powered by PunBB