View Single Post
  #1  
Old 08-21-2015, 02:37 AM
 
jmedinger jmedinger is offline
    
Join Date: Nov 2014
Posts: 0
 

Default Adding custom product tab breaks x-mobile skin

Using X-Cart 4.7.2

We've added a custom tab into the product detail page by editing /include/produt_tabs.php and adding
Code:
$product_tabs[] = array( 'title' => 'Description', 'tpl' => 'customer/main/tab_desc.tpl', 'anchor' => 'description' );
We've also got the x-cart-mobile module installed and as soon as we make this template change, the mobile product page stops working with a javascript error and refuses to load.

I've tracked this down to be caused by the {include file=$tab.tpl nodialog='Y'} in this code in \skin\common_files\modules\Xcart_Mobile\customer\m ain\product.tpl
Code:
{if $product_tabs} {foreach from=$product_tabs item=tab key=ind} <div data-role="collapsible" data-collapsed="true"> <h3>{$tab.title}</h3> <div>{include file=$tab.tpl nodialog='Y'}</div> </div> {/foreach} {/if}
but I can't figure out how to amend it so that it doesn't get confused by a tab that hasn't been dynamically created.

Can anyone suggest a way to work around this?

Thanks!
__________________
v4.6
Reply With Quote