Jump to content

Where is the code of these buttons?


Recommended Posts

What you need here is a command line tool (or equivalent) to search through the codebase for the text in question. If you are running a Linux box, "find" comes stock:

find . -type f -name \*.php -exec grep -iHn 'save and stay' {} \;

./admin/tabs/AdminProducts.php:1966:                                                     <input type="submit" value="'.$this->l('Save and stay').'" name="submitAdd'.$this->table.'AndStay" class="button" />

./admin/tabs/AdminProducts.php:2088:                                                     <input type="submit" value="'.$this->l('Save and stay').'" name="submitAdd'.$this->table.'AndStay" class="button" />



From the code above, I believe that this text can be changed via the admin interface by adding a translation for it.

http://www.prestashop.com/wiki/Languages_and_translations/

Cheers

Link to comment
Share on other sites

Ok, thanks a lot but now I have another trouble with this... Why make it so complicated? hehehe

Well, I need to keep those buttons third description (I've added to PS) in the DB. The extension works perfectly, PS load the data from the third description but I can not save the changes in BD.

To add the data I have to enter them manually to the DB with PhpMyAdmin.

I thought to get it, just have to find the code that modifies it but can not find. I see that is not with the buttons.

I'm sorry for my english, is not very well.

PS: On the files modified, find "description2" in all files and "desc_two" on AdminProduct.php

12473_m9yrC63QWNgemLL8WE1M_t

12474_H83i0FWKFcqjLc1H7D1X_t

files_modified.zip

Link to comment
Share on other sites

I believe that the text you are talking about is in the current theme's "product.tpl" file though in your case it looks like you are using a custom theme:

./themes/prestashop/product.tpl

>
</pre>
<ul>
               {if $product->description}{l s='More info'}{/if}
               {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}
</ul>



So this is either in the template or it is in a module that has modified {$HOOK_PRODUCT_TAB}.

Cheers

Link to comment
Share on other sites

If you donwload the files about my extension, the file product.tpl is already modified. I need that PS update some modifications on the 3th description "Description (2)".

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


       {if $product->description}{l s='More info'}{/if}
       {if $product->description2}{l s='Extra info'}{/if}
       {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}
       {if $product->description2}
       <!-- full second description -->
{$product->description2}
   {/if}
   {if $features}
       <!-- product's features -->

       {foreach from=$features item=feature}
{$feature.name|escape:'htmlall':'UTF-8'} {$feature.value|escape:'htmlall':'UTF-8'}
       {/foreach}

   {/if}
   {if $attachments}

       {foreach from=$attachments item=attachment}
{$attachment.name|escape:'htmlall':'UTF-8'}
{$attachment.description|escape:'htmlall':'UTF-8'}
       {/foreach}

   {/if}
   {if isset($accessories) AND $accessories}
       <!-- accessories -->




                   {foreach from=$accessories item=accessory name=accessories_list}
                       {assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)}

{$accessory.name|truncate:22:'...'|escape:'htmlall':'UTF-8'}


getImageLink($accessory.link_rewrite, $accessory.id_image, 'medium')}" alt="{$accessory.legend|escape:'htmlall':'UTF-8'}" />
{$accessory.description_short|strip_tags|truncate:100:'...'}



{displayWtPrice p=$accessory.price}
{l s='View'}
{l s='Add to cart'}


                   {/foreach}





   {/if}
   {$HOOK_PRODUCT_TAB_CONTENT}


{/if}

Link to comment
Share on other sites

×
×
  • Create New...