Hello, Guest |
| Register
Remember me Forgot password ?
Site Map Site Map Contact us Contact us
PrestaShop e-commerce software
  595 users online
Forum  >  English Forum  >  Third party modules  >  Thread

 
Post Reply
New Topic
[CONTRIBUTION] Boilerplate text in product descriptions

offline
Posted: 03 October 2009 10:46 PM   [ Ignore ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 103
  • last 7 days: 0
Joined: 2009-05-09

Are you typing the same phrases again and again in your product descriptions? You can streamline this process and make it easier to change these strings down the road if you use my Boilerplate mod. It’s a free download from

http://www.thatsoftwareguy.com/prestashop_boilerplate.html

with help and instructions.

 Signature 

That Software Guy - http://www.thatsoftwareguy.com
My Mods: Better Together, Boilerplate Description, Sort order in CMS
http://www.thatsoftwareguy.com/prestashop.html

Please support my feature request for a generalized fee/discount framework in PrestaShop: http://www.prestashop.com/bug_tracker/view/3044/

 
offline
Posted: 02 November 2009 01:18 AM   [ Ignore ]   [ # 1 ]
Apprentice
RankRank

Messages :

  • total: 47
  • last 7 days: 0
Joined: 2009-10-07

Now this will come in handy, I’ve been spending ages trying to perfect my wording on a paragraph that goes on about 10 different products because I don’t want to have to go back and change them all. This will definitely help!

 
offline
Posted: 02 November 2009 01:39 AM   [ Ignore ]   [ # 2 ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 103
  • last 7 days: 0
Joined: 2009-05-09

Glad you like it! I may do something similar for CMS pages – not quite sure yet.

 Signature 

That Software Guy - http://www.thatsoftwareguy.com
My Mods: Better Together, Boilerplate Description, Sort order in CMS
http://www.thatsoftwareguy.com/prestashop.html

Please support my feature request for a generalized fee/discount framework in PrestaShop: http://www.prestashop.com/bug_tracker/view/3044/

 
offline
Posted: 02 November 2009 02:00 AM   [ Ignore ]   [ # 3 ]
Apprentice
RankRank

Messages :

  • total: 47
  • last 7 days: 0
Joined: 2009-10-07

Installed it, just not quite sure where the line of code should go in the product.php file. I tried both before and after the first bracket

public    function __construct($id_product NULL$full false$id_lang NULL)
Boilerplate::doBoilerPlate($this$id_lang); 
    
{
    
        parent
::__construct($id_product$id_lang);
        if (
$full AND $this->id)
        
{
            $this
->manufacturer_name Manufacturer::getNameById(intval($this->id_manufacturer));
            
$this->supplier_name Supplier::getNameById(intval($this->id_supplier));
            
$tax = new Tax(intval($this->id_tax), intval($id_lang));
            
$this->tax_name $tax->name;
            
$this->tax_rate floatval($tax->rate);
            
$this->new $this->isNew();
        
}
        $this
->category Category::getLinkRewrite(intval($this->id_category_default), intval($id_lang));
        
$this->tags Tag::getProductTags($this->id);
    
}

Thanks,
Hawaii350

 
offline
Posted: 02 November 2009 02:04 AM   [ Ignore ]   [ # 4 ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 103
  • last 7 days: 0
Joined: 2009-05-09

End of function before last bracket. Right after the call to getProductTags.

 Signature 

That Software Guy - http://www.thatsoftwareguy.com
My Mods: Better Together, Boilerplate Description, Sort order in CMS
http://www.thatsoftwareguy.com/prestashop.html

Please support my feature request for a generalized fee/discount framework in PrestaShop: http://www.prestashop.com/bug_tracker/view/3044/

 
offline
Posted: 02 November 2009 02:12 AM   [ Ignore ]   [ # 5 ]
Apprentice
RankRank

Messages :

  • total: 47
  • last 7 days: 0
Joined: 2009-10-07

No luck :( just get a blank page. Copied files over to root of prestashop. Installed module. Modified en.php. Added line of code to product.php

http://ifixithawaii.com/prestashop/product.php?id_product=17

running 1.2.4

Thanks again for the help

 
offline
Posted: 02 November 2009 02:23 AM   [ Ignore ]   [ # 6 ]
Apprentice
RankRank

Messages :

  • total: 47
  • last 7 days: 0
Joined: 2009-10-07

seems to break with long bits of code. I erased my en.php mod and the page loaded again. Maybe what I am trying to do is not possible with this.

<?php
  $stringArray 
= array ( 
      
'%%SHIPPING_USA_ONLY%%' => "Shipping to USA only.",
      
'%%SATISFACTION_GUARANTEED%%' => "Your satisfaction is guaranteed!",
      
'%%ipod_broken_screen%%' => "<p><span style="font-sizesmall;">Did you accidentally drop your iPod and to your horror notice the screen has large, black, inky spots? Send it in to have the screen replaced, and before you know it you will be listening to music again.</span></p>
<p>&nbsp;</p>
<p><span style="
font-sizesmall;"><strong>Add this repair to your cart if your screen:</strong></span></p>
<ul>
<li><span style="
font-sizesmall;">Is cracked or has inky, black spots</span></li>
</ul>
<ul>
<li><span style="
font-sizesmall;">Remains white but the iPod still functions</span></li>
</ul>
<ul>
<li><span style="
font-sizesmall;">Does not turn on at all but the iPod still functions</span></li>
</ul>
<ul>
<li><span style="
font-sizesmall;">Turns on but is dim and very hard to see (no backlight)</span></li>
</ul>
<p>&nbsp;</p>
<p>In some cases, a non-functional screen may be caused by a faulty logic board. If the logic board is the culprit, you will be contacted and given the option to:</p>
<ul>
<li>Pay the difference in price to have the logic board replaced</li>
</ul>
<ul>
<li>Have your iPod returned and receive a refund minus the standard diagnostic fee ($4.95)</li>
</ul>
<ul>
<li> <a title="
Sell your ipod" href="http://ifixithawaii.com/prestashop/cms.php?id_cms=8">Sell it to us</a> and receive a full refund, plus extra CASH</li>
</ul>
<
p>&nbsp;</p>
<
p><em>If you have any custom engravings please <a title="custom engravings" href="http://ifixithawaii.com/prestashop/cms.php?id_cms=7">click here</a></em></p>
<
p>&nbsp;</p>
<
p><strong>90 Day Limited <a href="http://www.ifixithawaii.com/prestashop/cms.php?id_cms=2" target="_blank">Warranty</a></strong></p>
<
p><strong><br /></strong></p>"
  );
?>

 
offline
Posted: 02 November 2009 02:26 AM   [ Ignore ]   [ # 7 ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 103
  • last 7 days: 0
Joined: 2009-05-09

Something like this:

"<p><span style="font-sizesmall;">

has no hope of working. smile Be sure to escape inner quotes. It’s best to use single quote to wrap the string, and double quote inside, escaping as required.

 Signature 

That Software Guy - http://www.thatsoftwareguy.com
My Mods: Better Together, Boilerplate Description, Sort order in CMS
http://www.thatsoftwareguy.com/prestashop.html

Please support my feature request for a generalized fee/discount framework in PrestaShop: http://www.prestashop.com/bug_tracker/view/3044/

 
offline
Posted: 02 November 2009 02:35 AM   [ Ignore ]   [ # 8 ]
Apprentice
RankRank

Messages :

  • total: 47
  • last 7 days: 0
Joined: 2009-10-07

I knew it had to do something with the quotes within the quotes deal, just did not know you could replace the double quotes with single quotes smile Works like a charm now!

Thanks again,
Hawaii350

 
offline
Posted: 17 November 2009 09:53 AM   [ Ignore ]   [ # 9 ]
Senior Member
RankRankRank
Avatar

Messages :

  • total: 302
  • last 7 days: 0
Joined: 2009-01-02

Hi,
Is it possable to get this to work on prestashop v1.1 ?, It is something that I could use (for short description box text), so I am willing to donate to get it to work.

Or does anybody know of another way I can do this

All the best,
Cerberus22

 Signature 

Using Prestashop V1.1

 
offline
Posted: 12 March 2010 01:52 AM   [ Ignore ]   [ # 10 ]
Apprentice
RankRank

Messages :

  • total: 47
  • last 7 days: 0
Joined: 2009-10-07

Hope all is well.

Any chance of getting this to work on the short descriptions also or other parts of the website?

Keep up the great work!

 
 
 
Fast Reply
New Topic