View Single Post
  #2  
Old 08-25-2015, 04:12 AM
  razortw's Avatar 
razortw razortw is offline
 

X-Cart team
  
Join Date: Feb 2015
Posts: 807
 

Default Re: Adding custom product tab breaks x-mobile skin

Quote:
Originally Posted by jmedinger
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!
Could you please share the error with us?
Thanks.
__________________
Best regards,
Igor Pudovkin
X-Cart hosting team
Reply With Quote