Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Adding custom product tab breaks x-mobile skin

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #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
  #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
  #3  
Old 08-25-2015, 04:41 AM
 
jmedinger jmedinger is offline
    
Join Date: Nov 2014
Posts: 0
 

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

The error is a 500 Internal Server Error with the following javascript error.

Firebug reports the javascript error to be
Code:
$(document).bind('pagechangefailed', function() { console.log('pagechangefailed'); }); $( document ).bind('pageloadfailed', function( event, data ){ console.log('pageloadfailed');
although how this is related to the addition of a product tab on the desktop templates is beyond me!
See Firebug screenshot here http://dev.growhigh.co.uk/images/error.jpg
__________________
v4.6
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:41 AM.

   

 
X-Cart forums © 2001-2020