Jump to content

Extra product description tab


Recommended Posts

Hi,

I need a solution or module which would allow me to have additional tab in product description as seen on sample picture. It can not be "features tab" due to its limitation with characters but new tab with possibility to enter html code, etc...

Each product should have its own unique description.

Does anyone know for solution like this, is there any module for this.


Please advise ;)


Kind regards,
TineChem

28175_2dqgWjD6LpzzIMqgykxv_t

Link to comment
Share on other sites

This module might help.


This module does not give you the option to have unique description for each product.

I saw many people asking for extra tab in product description, where you could edit text using tinymce. This would be very useful in many shops. Are there any plans to do something like that in the future presta upgrades or is there anyone who can make this module?

Kind regards,

tineChem
Link to comment
Share on other sites

  • 2 weeks later...

Hi,

Ok, here it is(these changes were for ps1.2.5, for newer version read ahead the other posts).

In my case I needed two additional tab so you should adapt my modifications to your needs.

First of all I needed to alter the prestashop product_lang table

ALTER TABLE `myschema`.`myprefix_product_lang` ADD COLUMN `description2` TEXT NULL DEFAULT NULL  AFTER `description` ;
ALTER TABLE `myschema`.`myprefix_product_lang` ADD COLUMN `composition` TEXT NULL DEFAULT NULL  AFTER `description` ;

Then I needed to modify these files:

/classes/Product.php

/admin/tabs/AdminProducts.php

/themes/mytheme/product.tpl

changes to /classes/Product.php

my changes are enclosed with

/* pe extention composition */

add these instance variables around line 50 after the $description var definition

/** @var string Long description */
public		 $description;
/** pe extention composition*/
public		 $description2;
public		 $composition;	
/** pe extention composition*/
...

then find the line with :

protected $fieldsValidateLang = array( ......

end change it like this (in my case )

protected $fieldsValidateLang = array(
								'meta_description' => 'isGenericName', 'meta_keywords' => 'isGenericName',
								'meta_title' => 'isGenericName', 'link_rewrite' => 'isLinkRewrite', 'name' => 'isCatalogName',
								'description' => 'isCleanHtml',
								'description_short' => 'isCleanHtml',
								'available_now' => 'isGenericName',
								'available_later' => 'IsGenericName',
/* pe extention composition */
								'description2' => 'isCleanHtml',
								'composition' => 'isCleanHtml',
/*pe extention composition */
								);

then find this function : static public function getNewProducts(....) around line 1000

and modify the sentence around line 1050 , it should look like this after modifying it.

	$result = Db::getInstance()->ExecuteS('
		SELECT p.*, pl.`description`, ' .
		/**pe extention composition */
		' pl.`description2`, pl.`composition`,'.
		/**pe fin extention composition */		  
		'   pl.`description_short`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, p.`ean13`,
			i.`id_image`, il.`legend`, t.`rate`, m.`name` AS manufacturer_name, DATEDIFF(p.`date_add`, DATE_SUB(NOW(), INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY)) > 0 AS new,
			(p.`price` * ((100 + (t.`rate`))/100) - IF((DATEDIFF(`reduction_from`, CURDATE()) <= 0 AND DATEDIFF(`reduction_to`, CURDATE()) >=0) OR `reduction_from` = `reduction_to`, IF(`reduction_price` > 0, `reduction_price`, (p.`price` * ((100 + (t.`rate`))/100) * `reduction_percent` / 100)),0)) AS orderprice
		FROM `'._DB_PREFIX_.'product` p
		LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product` AND pl.`id_lang` = '.intval($id_lang).')
		LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = p.`id_product` AND i.`cover` = 1)
		LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.intval($id_lang).')
		LEFT JOIN `'._DB_PREFIX_.'tax` t ON (t.`id_tax` = p.`id_tax`)
		LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON (m.`id_manufacturer` = p.`id_manufacturer`)
		WHERE p.`active` = 1
		AND DATEDIFF(p.`date_add`, DATE_SUB(NOW(), INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY)) > 0
		AND p.`id_product` IN ('.$productsList.')
		ORDER BY '.(isset($orderByPrefix) ? pSQL($orderByPrefix).'.' : '').'`'.pSQL($orderBy).'` '.pSQL($orderWay).'
		LIMIT '.intval($pageNumber * $nbProducts).', '.intval($nbProducts));	

... see next post

Link to comment
Share on other sites

.. continue

then find this function

static public function getRandomSpecial($id_lang, $beginning = false, $ending = false)

end modify the select statement , it shoud look like this after that.

       $row = Db::getInstance()->getRow('
       SELECT p.*, pl.`description`,'.
       /*pe extention composition */
           ' pl.`description2`, pl.`composition`,'.
       /*pe fin extention composition */                   
           'pl.`description_short`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, p.`ean13`,
           i.`id_image`, il.`legend`, t.`rate`
       FROM `'._DB_PREFIX_.'product` p
       LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product` AND pl.`id_lang` = '.intval($id_lang).')
       LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = p.`id_product` AND i.`cover` = 1)
       LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.intval($id_lang).')
       LEFT JOIN `'._DB_PREFIX_.'tax` t ON t.`id_tax` = p.`id_tax`
       LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_product` = p.`id_product`)
       INNER JOIN `'._DB_PREFIX_.'category_group` ctg ON (ctg.`id_category` = cp.`id_category`)
       '.($cookie->id_customer ? 'INNER JOIN `'._DB_PREFIX_.'customer_group` cg ON (cg.`id_group` = ctg.`id_group`)' : '').'
       WHERE (`reduction_price` > 0 OR `reduction_percent` > 0)
       '.((!$beginning AND !$ending) ?
           'AND (`reduction_from` = `reduction_to` OR (`reduction_from` <= \''.pSQL($currentDate).'\' AND `reduction_to` >= \''.pSQL($currentDate).'\'))'
       :
           ($beginning ? 'AND `reduction_from` <= \''.pSQL($beginning).'\'' : '').($ending ? 'AND `reduction_to` >= \''.pSQL($ending).'\'' : '')).'
       AND p.`active` = 1
       AND ('.($cookie->id_customer ? 'cg.`id_customer` = '.intval($cookie->id_customer).' OR' : '').' ctg.`id_group` = 1)
       ORDER BY RAND()');



and this function

static public function getPricesDrop
modify the select after the line with this statement
$currentDate = date('Y-m-d');

   $currentDate = date('Y-m-d');
       $sql = '
       SELECT p.*, pl.`description`,'.
       /*pe extention composition */
           ' pl.`description2`, pl.`composition`,'.
       /*pe fin extention composition */                   
       ' pl.`description_short`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, p.`ean13`, i.`id_image`, il.`legend`, t.`rate`, (p.`reduction_price` + (p.`reduction_percent` * p.`price`)) AS myprice, m.`name` AS manufacturer_name
       FROM `'._DB_PREFIX_.'product` p
       LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product` AND pl.`id_lang` = '.intval($id_lang).')
       LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = p.`id_product` AND i.`cover` = 1)
       LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.intval($id_lang).')
       LEFT JOIN `'._DB_PREFIX_.'tax` t ON (t.`id_tax` = p.`id_tax`)
       LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON (m.`id_manufacturer` = p.`id_manufacturer`)
       LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_product` = p.`id_product`)
       INNER JOIN `'._DB_PREFIX_.'category_group` ctg ON (ctg.`id_category` = cp.`id_category`)
       '.($cookie->id_customer ? 'INNER JOIN `'._DB_PREFIX_.'customer_group` cg ON (cg.`id_group` = ctg.`id_group`)' : '').'
       WHERE (`reduction_price` > 0 OR `reduction_percent` > 0)
       '.((!$beginning AND !$ending) ?
           'AND (`reduction_from` = `reduction_to` OR (`reduction_from` <= \''.pSQL($currentDate).'\' AND `reduction_to` >= \''.pSQL($currentDate).'\'))'
       :
           ($beginning ? 'AND `reduction_from` <= \''.pSQL($beginning).'\'' : '').($ending ? 'AND `reduction_to` >= \''.pSQL($ending).'\'' : '')).'
       AND p.`active` = 1
       AND ('.($cookie->id_customer ? 'cg.`id_customer` = '.intval($cookie->id_customer).' OR' : '').' ctg.`id_group` = 1)
       GROUP BY p.`id_product`
       ORDER BY '.(isset($orderByPrefix) ? pSQL($orderByPrefix).'.' : '').'`'.pSQL($orderBy).'`'.' '.pSQL($orderWay).'
       LIMIT '.intval($pageNumber * $nbProducts).', '.intval($nbProducts);




The next thing we need to modify is
/themes/mythemes/product.tpl
around line 360 look at this section

<!-- description and features -->
{if $product->description || $features || $accessories || $HOOK_PRODUCT_TAB || $attachments}




see next post..

  • Like 1
Link to comment
Share on other sites

...
and chage it like this , look inside the {if} statement , added description2 and composition


<!-- description and features -->
{if $product->description || $product->description2 || $product->composition || $features || $accessories || $HOOK_PRODUCT_TAB || $attachments}


       {if $product->description}{l s='More info'}{/if}
       <!-- pe extention composition -->
       {if $product->description2}{l s='Description2'}{/if}
       {if $product->composition}{l s='Composition'}{/if}
       <!-- pe extention composition -->
       {if $features}{l s='Data sheet'}{/if}
       {if $attachments}{l s='Download'}{/if}
       {if isset($accessories) AND $accessories}{l s='Accessories'}{/if}
       {$HOOK_PRODUCT_TAB}


   {if $product->description}
       <!-- full description -->
{$product->description}
   {/if}
        <!-- pe extention composition -->
   {if $product->description2}
       <!-- full description -->
{$product->description2}        
   {/if}    
   {if $product->composition}
       <!-- full description -->
{$product->composition}        
   {/if}
        <!-- pe extention composition -->

       ..... the rest of the template doesnt need modification

Link to comment
Share on other sites

  • 3 weeks later...

Thank you very much for posting your solution.
I am using Prestashop version 1.3.1.1

Your version of Prestashop files manages languages differently than mine.
I was unable to find, in my files, the language management code you changed.
So, I'd like to post the changes to language code I had to make to get this to work:

/classes/Product.php

After:

$fields[$language['id_lang']]['description'] = (isset($this->description[$language['id_lang']])) ? pSQL($this->description[$language['id_lang']], true) : '';

Add:

$fields[$language['id_lang']]['extra_content_name_here'] = (isset($this->extra_content_name_here[$language['id_lang']])) ? pSQL($this->extra_content_name_here[$language['id_lang']], true) : '';

Link to comment
Share on other sites

I cant get it to work. I do get the interface in the admin panel but when i try to add data i get the error:

(Unknown column 'description2' in 'field list'

Any ideas?

Thanx


Prestashop can't find the column in the database.

The user, ezakimak, mentioned the changes needed in the database, but his SQL code requires personalization. For most users, the SQL code should look like:
ALTER TABLE `ps_product_lang` ADD COLUMN `description2` TEXT NULL DEFAULT NULL  AFTER `description` ;
ALTER TABLE `ps_product_lang` ADD COLUMN `composition` TEXT NULL DEFAULT NULL  AFTER `description` ;



Be sure to follow all of ezakimak's code changes. If you miss one, it still won't work.

Link to comment
Share on other sites

  • 4 weeks later...

I cant find /* pe extention composition */ in AdminProducts.php
Аnd what it mean : adapt it to your file ?
After modification in admin panel i dont see any products.
Help me and many other people. Please attach 3 complete modifiled files. Respect!

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

I'm using this module: conseil utilisation from Bretagne. Works perfect and you can select the products on a drop-down list where you can add extra text.

I bought it at presta-shop, but now I don't find it anymore there, perhaps you can ask on contact form there ?

Link to comment
Share on other sites

  • 3 weeks later...
I'm using this module: conseil utilisation from Bretagne. Works perfect and you can select the products on a drop-down list where you can add extra text.I bought it at presta-shop, but now I don't find it anymore there, perhaps you can ask on contact form there ?


I tried to google this "conseil utilisation from Bretagne" module
but... with no good luck. Anybody else knows where to find it?

It is a very important and useful addition to the PS detail page.
In my particular case, I would like to put into this extra tab
the ToC (Table of Contents) of each of my products (books).

Of course, I am sure that everybody else
would easily find a good use out of this extra tab module.

Thank you from Kolkata (Calcutta)
[/i]Angelo[/i]
Link to comment
Share on other sites

Hi everybody !!
I am glad that many people had found this useful and I would like to ask for your help, I am not an expert in PHP nor Smarty Template, not even in Prestashop, so I would really appreciate if someone here can give some advices on how to write a module from these changes I made to the base code, I think this way many people could take advantage of the code I changed to have these extra tabs.

Regards

Hugh

Link to comment
Share on other sites

Hi Thanks for the fast response.

I had seen your mods in the earlier posts but being a non coder I would be lost trying to undertake the changes and hoped it might be possible to just replace the original with the changed files - if that were possible. I might just cope with that.

I agree it would be good to have a module that could fix this.

It seems the guys at PS seem to miss the basics and go for to much wizzy stuff.

I am experimenting with using the cms facility or perhaps linking to pdf data files but so far its not as claen a solyion as I would like.

Thanks

Link to comment
Share on other sites

  • 4 weeks later...

Hi there!

I have made all the instructions that are written on this post but i can't get this "module" to work.
I've made the changes in classes/Product.php and theme/product.tpl with no problems or issues. But i'm having a problem with the file AdminProducts.php
I've downloaded the archive AdminProducts.php, but when i search for the resquested line of code it appears like this:

$divLangName = 'cname¤cdesc¤cdesc2¤ccomposition¤cdesc_short¤clink_rewrite¤cmeta_description¤cmeta_title¤cmeta_keywords¤ctags¤cavailable_now¤cavailable_later';

and when i paste it on the requested line it won't work.
In the backoffice of my page nothing appear's on add product page.
Am i doing anything wrong? Can anyone help me to solve this problem?

What does "¤" means?

And another question. The original line
/* original
$divLangName = 'cname¤cdesc¤cdesc_short¤clink_rewrite¤cmeta_description¤cmeta_title¤cmeta_keywords¤ctags¤cavailable_now¤cavailable_later';
*/
it's not present on stock AdminProducts.php

I'm waiting for a response.
Sorry about my bad english.

Merry Christmas to all!
Regards

Link to comment
Share on other sites

  • 2 weeks later...

Attention, pour que l'enregistrement en base soit correct, vous devez également ajouter les 2 lignes suivantes dans le fichier classes/Product.php :

$fields[$language['id_lang']]['description2'] = (isset($this->description2[$language['id_lang']])) ? pSQL($this->description2[$language['id_lang']], true) : '';
$fields[$language['id_lang']]['composition'] = (isset($this->composition[$language['id_lang']])) ? pSQL($this->composition[$language['id_lang']], true) : '';



Après la ligne suivante dans la fonction public function getTranslationsFieldsChild() :

$fields[$language['id_lang']]['description'] = (isset($this->description[$language['id_lang']])) ? pSQL($this->description[$language['id_lang']], true) : '';



Arnaud
http://www.cookiesoap.com/

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

Hi

I realy need your help, so please help me. I have modified all files as u write to get Extra product description tab. But i have big problem and i cant solve it. At my local host it work great, but when i uploadet it to web server it wont work. When I wrote something in description in BO doesnt make extra tab, but if i look for it in phpmay admin i can see description which i wrote in BO. So presta wont show extra tab. Please tell me what to do, i realy need this tabs.

Br Andrej

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

Hi, for ps1.4.0.17 I think these changes are enough
please make a backup of your files before aplying these changes and make sure to add the extra columns to your product table in your database

regards

Hugh

ps. put the Product.php in the /override/classes directory and the adminproducts.php in /youradmindir/tabs/ and the product.tpl in your theme dir.
Dont forget that my changes are always inside these /*pe extention */

By the way is there a way to override the admin*classes.php the same way we can override the other classes nw in ps1.47 ?

extratabs.zip

Link to comment
Share on other sites

Thanks, this is a brilliant mod and relatively simple to install.

Just one small thing the comments in product.tpl are the wrong type, you used /* pe .. */ when only <!-- pe ex... --> will work.

( You might of missed this in testing, perhaps you did not delete the files 'tools/smarty/compile'. I must admit that got me confused, having made the corrections and then they didn't seem to get applied. )

Link to comment
Share on other sites

  • 4 weeks later...
Hi, for ps1.4.0.17 I think these changes are enough
please make a backup of your files before aplying these changes and make sure to add the extra columns to your product table in your database

regards

Hugh

ps. put the Product.php in the /override/classes directory and the adminproducts.php in /youradmindir/tabs/ and the product.tpl in your theme dir.
Dont forget that my changes are always inside these /*pe extention */

By the way is there a way to override the admin*classes.php the same way we can override the other classes nw in ps1.47 ?


sorry but it does not work for me. On Bo now I have no products showing anymore. Also the lines posted are not correct in the files of version 1.4.0.17. There are some header addings now. I made the changes by looking for equivalent code. and also added the $fields[language lines.
Cleared smarty cache. cleared browser. No products on BO.

Can somebody please post here an original 1.4.0.17 adapted /classes/products.php ? Mine is not working.

Also the AdminProducts in /admin/tabs is not an dapted 1.4.0.17, but an 1.x, so it need to be revised for version 1.4. to put it to work.
Link to comment
Share on other sites

Hi,

al the code changes from post 6 to 9 in here. The changes for/admin/tabs/AdminProducts.php in post 8 I tried, but the original 1.4.0.17 contains other code as the file AdminProducts.php attached in post #8 (which seems to be from an 1.3. version).

At final I added the files from #36 to the directory stated there and saw that again is attached an new /admin/tabs/Adminproducts.php in there, which is also different in code as the original 1.4.01.7. Some parts to adapt ok, but there are basics also changed, nothing related to your nex Tabs description2 and composition.

Link to comment
Share on other sites

Sorry but I couldnt understand what you meant.
Regards
Hugo

But , The Backend update coding is missing. It's not update with database, put is correctly retrieve the
information and show both admin as well as front end. Let me know , I do something wrong ?
Link to comment
Share on other sites

Hi, if you are running ps1.4.0.17 , you will need only the files posted in #36, and of course , you will need to add the columns to your database
regards
Hugo

Hi,

al the code changes from post 6 to 9 in here. The changes for/admin/tabs/AdminProducts.php in post 8 I tried, but the original 1.4.0.17 contains other code as the file AdminProducts.php attached in post #8 (which seems to be from an 1.3. version).

At final I added the files from #36 to the directory stated there and saw that again is attached an new /admin/tabs/Adminproducts.php in there, which is also different in code as the original 1.4.01.7. Some parts to adapt ok, but there are basics also changed, nothing related to your nex Tabs description2 and composition.
Link to comment
Share on other sites

Hi,

applaws.... thousand thxs. Yes it works and very simple for version 1.4.X Only one thing I have see on pictures.
Where can I change the text of tabs and also for product on BO ?

There is iphone text and composition, fronted moreinfo2 and composition. I want to translate them and in fact I need only one extra tab.

Regards

Conny

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 2 weeks later...
Thanks, this is a brilliant mod and relatively simple to install.

Just one small thing the comments in product.tpl are the wrong type, you used /* pe .. */ when only <!-- pe ex... --> will work.

( You might of missed this in testing, perhaps you did not delete the files 'tools/smarty/compile'. I must admit that got me confused, having made the corrections and then they didn't seem to get applied. )


Hi
can you please give a bit of help doing the same, i need the extra Tab, i just downloaded the ZIP file but where can i start?
thanks in advance
Link to comment
Share on other sites


Hi
can you please give a bit of help doing the same, i need the extra Tab, i just downloaded the ZIP file but where can i start?
thanks in advance

can you tell us a little bit more of your environment ? Which ps version are you using for instance
Regards
Hugo
Link to comment
Share on other sites


Hi
can you please give a bit of help doing the same, i need the extra Tab, i just downloaded the ZIP file but where can i start?
thanks in advance

can you tell us a little bit more of your environment ? Which ps version are you using for instance
Regards
Hugo

Hi
Thank you for your replay, we are running PS 1.4.2, hostet bei provider in Switzerland.

best regards, adel
Link to comment
Share on other sites

Please read post #36 and #57 , those steps should be enough.
regards

Hugo


Hi
can you please give a bit of help doing the same, i need the extra Tab, i just downloaded the ZIP file but where can i start?
thanks in advance

can you tell us a little bit more of your environment ? Which ps version are you using for instance
Regards
Hugo

Hi
Thank you for your replay, we are running PS 1.4.2, hostet bei provider in Switzerland.

best regards, adel
Link to comment
Share on other sites

Please read post #36 and #57 , those steps should be enough.
regards

Hugo


Hi
can you please give a bit of help doing the same, i need the extra Tab, i just downloaded the ZIP file but where can i start?
thanks in advance

can you tell us a little bit more of your environment ? Which ps version are you using for instance
Regards
Hugo

Hi
Thank you for your replay, we are running PS 1.4.2, hostet bei provider in Switzerland.

best regards, adel




Hi

I did exact, i can see at the admin zone Product description2 and Product description compotionen, but by the Product in the front office i can not see the extra 2 Tabs.

thanks in advance adel
Link to comment
Share on other sites

I attached in here a for 1.4.2 working AdminProducts.php. Please proceed for installation according post #36 in here and replace from the download there the attached AdminProducts.php.

hI
i did exact the as #36, now i can see the extra Product description in the Back Office but by the Product in the front office there is only still one Product description!!!! can you help please?
thanks adel

PS. i have PS 1.4.2
Link to comment
Share on other sites

  • 5 weeks later...
  • 2 weeks later...

Hi all,

First, Congratulations to ezakimak and everyone who helped maintaining this solution for creating new tabs in the product page.

My question is simple : is it possible that the contents of the newly created tabs are the same for every product? (without copy/paste the same HTML code on every back-office product page, of course !)

Thank you all.

D

Link to comment
Share on other sites

  • 2 months later...

I agree with you, and any help to accomplish that is welcome.

On the other hand, now with the new Prestashop architecture(thanks to the ps team !! ) it is easier to upgrade

 

Regards

Hugo

 

 

Only issue with this solution is that you cannot upgrade PrestaShop each time they come out with a security patch or new version. Would be best if this was solved by hooking in or a more modular way that avoids modifying the core code files.

Link to comment
Share on other sites

  • 2 weeks later...

Hi Hugo,

 

I'm using ps 1.3.7. Followed all your step but it did not work. White page display.

So, could you please help me to solved this problem?

 

Thanks,

Huan

 

Do you get empty page in admin or front office? Try to enable the debug mode in config/config.inc.php - change display_errors to 'on' and _PS_DEBUG_SQL_ to true. This should help you to find out what's wrong.

Link to comment
Share on other sites

Hi webplus,

Those were my first attemps to modify the product class in order to get the extra tab to work, I guess they are not needed to be modified, I think we only need to change the getfields method

 

Thanks for your suggestion

Regards

Hugo

 

Great work, thanks for sharing! One question - is it neccessary to modify getRandomSpecial, getPricesDrop and getNewProducts functions? It seems to be working fine without that change for me.

Link to comment
Share on other sites

 

Do you get empty page in admin or front office? Try to enable the debug mode in config/config.inc.php - change display_errors to 'on' and _PS_DEBUG_SQL_ to true. This should help you to find out what's wrong.

 

Exactly, my problem is from AdminProducts.php. When I replaced attached file (Hugo mentioned), back office did not work.

Can you please help me modified this AdminProducts.php? You could download it from attached.

Thanks a lot,

AdminProducts.php

 

Huan,

Link to comment
Share on other sites

Huan

You do not have to replace the file, instead look inside the code the changes needed for you installation, those changes where between /* pe .... */ comments

 

hope that helps

 

Hugo

 

Exactly, my problem is from AdminProducts.php. When I replaced attached file (Hugo mentioned), back office did not work.

Can you please help me modified this AdminProducts.php? You could download it from attached.

Thanks a lot,

AdminProducts.php

 

Huan,

Link to comment
Share on other sites

Huan

You do not have to replace the file, instead look inside the code the changes needed for you installation, those changes where between /* pe .... */ comments

 

hope that helps

 

Hugo

 

Hi Hugo,

 

After few hours for changing code. Everything seems Okay. But in back office display "?" images for the space to key information for new description tab. (Pls. see attached file for more details)

 

Could you please take your time to check for me this error?

 

Thanks a lot,

Huan

post-42755-0-56444300-1318844274_thumb.jpg

Link to comment
Share on other sites

Hi Huan,

I use prstashop 1.4.0.17, so I guess my changes wont work for your installation, You should check the code changes for that particular version, I will have a look in my free time and see what comes out.

Regards

Hugo

 

Hi Hugo,

 

After few hours for changing code. Everything seems Okay. But in back office display "?" images for the space to key information for new description tab. (Pls. see attached file for more details)

 

Could you please take your time to check for me this error?

 

Thanks a lot,

Huan

Link to comment
Share on other sites

Any chance for you to upgrade to 1.4.0.17?

 

 

Hi Hugo,

 

After few hours for changing code. Everything seems Okay. But in back office display "?" images for the space to key information for new description tab. (Pls. see attached file for more details)

 

Could you please take your time to check for me this error?

 

Thanks a lot,

Huan

Link to comment
Share on other sites

  • 2 months later...

In the meantime there are available on add-ons paid modules for this, for all not able to get it run. I adapted my latest version to 1.4.3. with ezakimaks help and it is still working on all versions after.

 

Modul for extra tab with variable text on product-description: http://addons.prestashop.com/de/front-office-features/3640-general-tab-.html

Modul for extra tab with one and fix text: http://addons.prestashop.com/de/front-office-features/3529-ultra-tab---aditional-tab--.html

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...
  • 1 month later...
  • 1 month later...
  • 1 month later...

Hi,

 

I need a solution or module which would allow me to have additional tab in product description as seen on sample picture. It can not be "features tab" due to its limitation with characters but new tab with possibility to enter html code, etc...

 

Each product should have its own unique description.

 

Does anyone know for solution like this, is there any module for this.

 

 

Please advise ;)

 

 

Kind regards,

TineChem

 

Hi,

Our module support this. You can take a look at here

http://www.prestashop.com/forums/topic/138779-module-attribute-tab-allow-creating-product-tabs-with-unlimited-text-area-field-attribute/

Thanks

Link to comment
Share on other sites

  • 2 months later...

Hi ezakimak, the solution was working for me till version 1.4.9. Yesterday it was released 1.5.0.17 as final. I'm trying to add the tabs here to

 

/controllers/admin/AdminProductController.php

and also on this file

/admin/themes/default/template/controllers/products/information.tpl

 

But it is not working. Can please somebody help me to adapt ?

 

/override/Product.php I've already added and in front-office the tabs are available, but cannot find or adapt the tpl for the BO to have the second description available on product.

 

I need to use ezakimak's fix, because all other buying modules does not meet my needs. It is not possible for me to maintain a catalog of 9.000 products on the base to have the tab as an extra feature, for afterwards link a product to a specific tab. I need this extra description exactly under the product description so IN the product and nearby description 1. So please don't link me to buying modules not working by this way.

Link to comment
Share on other sites

  • 4 months later...

@MegVenture - sorry, but this is not the same. You are adding external files. The module here is adding 2 extra tabs which you can add extra text on product. Please Edit your post by deleting your advertisement. Otherwise a moderator will delete it. Thank you.

Link to comment
Share on other sites

I got it. For PS 1.5. there is no /controllers/admin/AdminProductController.php anymore.

 

You must add this code to your:

 

/admin/themes/default/template/controllers/products/informations.tpl about line 254 after the block for DESCRIPTION

 

<td class="col-left">
 {include file="controllers/products/multishop/checkbox.tpl" field="description2" type="tinymce" multilang="true"}
 <label>{l s='Description2:'}<br /></label>
 <p class="product_description">({l s='appears in the body of the product page'})</p>
</td>
<td style="padding-bottom:5px;">
  {include file="controllers/products/textarea_lang.tpl" languages=$languages
  input_name='description2'
  input_value=$product->description2
  }
 <p class="clear"></p>
</td>
  </tr>
		<td class="col-left">
 {include file="controllers/products/multishop/checkbox.tpl" field="composition" type="tinymce" multilang="true"}
 <label>{l s='Composition:'}<br /></label>
 <p class="product_description">({l s='appears in the body of the product page'})</p>
</td>
<td style="padding-bottom:5px;">
  {include file="controllers/products/textarea_lang.tpl" languages=$languages
  input_name='composition'
  input_value=$product->composition
  }
 <p class="clear"></p>
</td>
  </tr>

 

This will than show both extra tabs on the product page tab "information" on BO. All other instructions are the same as for PS 1.4. written in Post#36 herein.

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

@cd2500: Hi. I tried to install an extra description tab. I did all the changes as per the instruction provided by you and ezakimak. I got and extra description and composition block in the back office. But when i see my Shop, all the things has been messed up in the product page. this is how my product looks now:

 

http://www.filedropper.com/untitled_4

 

i had reverted back all the changes but still unable to get the old product page back.

plz help me.

Edited by ruchit.devil (see edit history)
Link to comment
Share on other sites

I got it. For PS 1.5. there is no /controllers/admin/AdminProductController.php anymore.

 

You must add this code to your:

 

/admin/themes/default/template/controllers/products/informations.tpl about line 254 after the block for DESCRIPTION

 

<td class="col-left">
 {include file="controllers/products/multishop/checkbox.tpl" field="description2" type="tinymce" multilang="true"}
 <label>{l s='Description2:'}<br /></label>
 <p class="product_description">({l s='appears in the body of the product page'})</p>
</td>
<td style="padding-bottom:5px;">
  {include file="controllers/products/textarea_lang.tpl" languages=$languages
  input_name='description2'
  input_value=$product->description2
  }
 <p class="clear"></p>
</td>
  </tr>
		<td class="col-left">
 {include file="controllers/products/multishop/checkbox.tpl" field="composition" type="tinymce" multilang="true"}
 <label>{l s='Composition:'}<br /></label>
 <p class="product_description">({l s='appears in the body of the product page'})</p>
</td>
<td style="padding-bottom:5px;">
  {include file="controllers/products/textarea_lang.tpl" languages=$languages
  input_name='composition'
  input_value=$product->composition
  }
 <p class="clear"></p>
</td>
  </tr>

 

This will than show both extra tabs on the product page tab "information" on BO. All other instructions are the same as for PS 1.4. written in Post#36 herein.

 

Hi,

I got the extra description block on the BACK OFFICE, but how do i enable it in the front office

Link to comment
Share on other sites

  • 7 months later...

I got it. For PS 1.5. there is no /controllers/admin/AdminProductController.php anymore.

 

You must add this code to your:

 

/admin/themes/default/template/controllers/products/informations.tpl about line 254 after the block for DESCRIPTION

 

<td class="col-left">
	 {include file="controllers/products/multishop/checkbox.tpl" field="description2" type="tinymce" multilang="true"}
	 <label>{l s='Description2:'}<br /></label>
	 <p class="product_description">({l s='appears in the body of the product page'})</p>
	</td>
	<td style="padding-bottom:5px;">
	  {include file="controllers/products/textarea_lang.tpl" languages=$languages
	  input_name='description2'
	  input_value=$product->description2
	  }
	 <p class="clear"></p>
	</td>
   </tr>
			<td class="col-left">
	 {include file="controllers/products/multishop/checkbox.tpl" field="composition" type="tinymce" multilang="true"}
	 <label>{l s='Composition:'}<br /></label>
	 <p class="product_description">({l s='appears in the body of the product page'})</p>
	</td>
	<td style="padding-bottom:5px;">
	  {include file="controllers/products/textarea_lang.tpl" languages=$languages
	  input_name='composition'
	  input_value=$product->composition
	  }
	 <p class="clear"></p>
	</td>
   </tr>
This will than show both extra tabs on the product page tab "information" on BO. All other instructions are the same as for PS 1.4. written in Post#36 herein.

 

 

Hi cd2500,

 

If possible, could you please write the instruction step by step how to use this solution in PS 1.5. We'll very appreciate.

I'm also use this solution in PS 1.4 and it works fine but when upgrade my shop to PS 1.5, I don't know how to make it work.

 

Thank you,

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...