X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   "Customers also bought" as the default tab (https://forum.x-cart.com/showthread.php?t=66215)

franki 02-25-2013 01:09 AM

"Customers also bought" as the default tab
 
Hi,

I'm trying to make "Customers also bought" as the default tab (instead of the "Send to friend" tab) when viewing the product details page.

I figured the file to edit is /skin/common_files/customer/main/ui-tabs.tpl

but I'm unable to make head or tail of the JQuery part to make this work:

Code:

(xcart ver 4.5.5)

<script type="text/javascript">
//<![CDATA[
$(function() {ldelim}
  var days = ('function' != typeof window.func_is_allowed_cookie || func_is_allowed_cookie('ui-tabs-')) ? 1 : -1;
  var tOpts = {ldelim}
    idPrefix: '{$prefix|default:"ui-tabs-"}', cookie: {ldelim} expires: days {rdelim}{if $selected}, selected: '{$selected}'{/if}
  {rdelim};
  $('#{$prefix}container').tabs(tOpts);
{rdelim});
//]]>
</script>


The rendered HTML is:
Code:

<script type="text/javascript">
//<![CDATA[
$(function() {
  var days = ('function' != typeof window.func_is_allowed_cookie || func_is_allowed_cookie('ui-tabs-')) ? 1 : -1;
  var tOpts = {
    idPrefix: 'product-tabs-', cookie: { expires: days }  };
  $('#product-tabs-container').tabs(tOpts);
});
//]]>
</script>

<div id="product-tabs-container">

  <ul>
     
    <li><a href="#product-tabs-send2friend">Send to friend</a></li>
     
    <li><a href="#product-tabs-recommends">Customers also bought</a></li>
     
    <li><a href="#product-tabs-feedback">Customer feedback</a></li>
    </ul>


Can anyone please help me or point me to the right direction?

Thanks.

welly 03-01-2013 05:14 PM

Re: "Customers also bought" as the default tab
 
Hi Franki,

ui-tabs.tpl isn't the file that governs the order of the tabs.

Addison provided some excellent details about tabs in the following post which may help you:

http://forum.x-cart.com/showthread.php?t=63596

You may well find the answer there.

Welly

franki 03-04-2013 06:13 PM

Re: "Customers also bought" as the default tab
 
Thanks for that Welly!


All times are GMT -8. The time now is 08:45 PM.

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