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

How to add tabs to product page?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-24-2010, 11:56 AM
 
burak.82 burak.82 is offline
 

Member
  
Join Date: Dec 2010
Posts: 15
 

Default How to add tabs to product page?

Hi,

I would like to add " detailed description " of a product to the product tabs so that i show the customers short description next to the product picture and they see full description below at the tabs section

is this possible?

tia

burak
__________________
X-Cart Gold 4.4.1
Reply With Quote
  #2  
Old 12-24-2010, 03:00 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: How to add tabs to product page?

Yes that is possible but you will have to edit the php and template files responsible for the tabs to achieve this
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 12-24-2010, 04:11 PM
 
e-best1 e-best1 is offline
 

Member
  
Join Date: Sep 2008
Posts: 22
 

Default Re: How to add tabs to product page?

what kinds of php and template files have to be edited ?
__________________
X-cart Gold 4.4.1
Linux
Reply With Quote
  #4  
Old 12-24-2010, 07:51 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: How to add tabs to product page?

include/product_tabs.php is the php file
you may or may not need to skin/common_files/customer/tabs.tpl
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 12-25-2010, 02:10 AM
 
burak.82 burak.82 is offline
 

Member
  
Join Date: Dec 2010
Posts: 15
 

Default Re: How to add tabs to product page?

i dont have any knowladge of php right at the moment so in order to insert the "detailed description" of a product to product tabs, i need to first create a moduie from the admin panel and write a script to the product_tabs.php file ?
__________________
X-Cart Gold 4.4.1
Reply With Quote
  #6  
Old 12-25-2010, 07:50 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: How to add tabs to product page?

You can either modify the php file so you don't have to modify the template or you can modify the template only which will require you to have smarty, html and css knowledge (no php knowledge). If you don't know any of them I would success to you to hire a professional to help you.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #7  
Old 12-26-2010, 04:54 AM
 
Sunray Sales Sunray Sales is offline
 

Senior Member
  
Join Date: Dec 2010
Posts: 194
 

Default Re: How to add tabs to product page?

Hi, I would like to do the same, as OP, create an additional tab called Detailed Description. Then then fill that tab with text.

I have looked at the include/product_tabs.php and skin/common_files/customer/tabs.tpl

I know html, css, javascript, but I don't know PHP but do roughly understand whats going on in the product_tabs.php.

@cflsystems you mentioned that you could use html and css to add a tab, my question is wouldn't that be hard coding it? What file would I use to hardcode this new tab?

Thanks!
__________________
4.4.2
www.sunraysales.com
HandsOnWebHosting
Reply With Quote
  #8  
Old 12-26-2010, 06:14 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: How to add tabs to product page?

Yes you hard coded in skin/customer/ui_tabs.tpl.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #9  
Old 12-26-2010, 10:36 AM
 
Sunray Sales Sunray Sales is offline
 

Senior Member
  
Join Date: Dec 2010
Posts: 194
 

Default Re: How to add tabs to product page?

Oh ok great thanks, I actually figure it out.

I used this product_tabs.php.

I then created my own template file.

I know this is just a jerry-rigged way of doing it, but it does work.
Can you help me with the first line of code?
PHP Code:
if ($config['Appearance']['send_to_friend_enabled'] == 'N') { 

As you can see I just copied the send to friend code and replaced a few things, most importantly I change Enabled == 'N', because I will not enable this.

PHP Code:
if ($config['Appearance']['send_to_friend_enabled'] == 'N') {
$product_tabs[] = array(
'title' => func_get_langvar_by_name('lbl_details'),
'tpl' => 'customer/main/p-details.tpl'// 'modules/Customer_Reviews/vote_reviews.tpl'
'anchor' => 'details'
);
}
 
if (
$config['Appearance']['send_to_friend_enabled'] == 'Y') {
$product_tabs[] = array(
'title' => func_get_langvar_by_name('lbl_send_to_friend'),
'tpl' => 'customer/main/send_to_friend.tpl',
'anchor' => 'send2friend'
);


To see the final outcome, have a look at this one particular product.
http://www.sunraysales.com/xcart/product.php?productid=11382&cat=174&page=1

PS: I have over 11,000 products, so the extra product details have only been applied to the first 500 products.

Please let me know what you think?

Thanks.
__________________
4.4.2
www.sunraysales.com
HandsOnWebHosting
Reply With Quote
  #10  
Old 12-28-2010, 02:46 AM
 
burak.82 burak.82 is offline
 

Member
  
Join Date: Dec 2010
Posts: 15
 

Default Re: How to add tabs to product page?

link is not working, i would like to see an example
__________________
X-Cart Gold 4.4.1
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 11:43 AM.

   

 
X-Cart forums © 2001-2020