PrestaShop Forums: [CONTRIBUTION] Boilerplate text in product descriptions - PrestaShop Forums

Jump to content


Welcome to the PrestaShop Forum! We hope you'll share your comments and suggestions with us. We ask that you please post in English to the main sections of the PrestaShop Forum. If you want to write in another language, please post in the corresponding PrestaShop Community section below.

Please note that PrestaShop Community sections are largely self-moderated. PrestaShop team members may or may not participate in non-English sections. To improve the chances of receiving feedback to your question or comment, please post it in English to the main sections of our Forum.

NYC

Vous parlez français ? par ici !


[CONTRIBUTION] Boilerplate text in product descriptions


[CONTRIBUTION] Boilerplate text in product descriptions

#1 swguy

    PrestaShop Apprentice

  • 09 May 2009
  • Members
  • PipPip
  • 95 posts
  • Location:Tampa, Florida

Posted 03 October 2009 - 07:46 PM

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.thatsoftw...oilerplate.html

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

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

#2 hawaii350

    PrestaShop Apprentice

  • 07 Oct 2009
  • Members
  • PipPip
  • 53 posts

Posted 01 November 2009 - 11:18 PM

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!

#3 swguy

    PrestaShop Apprentice

  • 09 May 2009
  • Members
  • PipPip
  • 95 posts
  • Location:Tampa, Florida

Posted 01 November 2009 - 11:39 PM

Glad you like it! I may do something similar for CMS pages - not quite sure yet.
That Software Guy - http://www.thatsoftwareguy.com
My Mods: Better Together, Boilerplate Description, Sort order in CMS
http://www.thatsoftw...prestashop.html

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

#4 hawaii350

    PrestaShop Apprentice

  • 07 Oct 2009
  • Members
  • PipPip
  • 53 posts

Posted 02 November 2009 - 12:00 AM

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

#5 swguy

    PrestaShop Apprentice

  • 09 May 2009
  • Members
  • PipPip
  • 95 posts
  • Location:Tampa, Florida

Posted 02 November 2009 - 12:04 AM

End of function before last bracket. Right after the call to getProductTags.
That Software Guy - http://www.thatsoftwareguy.com
My Mods: Better Together, Boilerplate Description, Sort order in CMS
http://www.thatsoftw...prestashop.html

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

#6 hawaii350

    PrestaShop Apprentice

  • 07 Oct 2009
  • Members
  • PipPip
  • 53 posts

Posted 02 November 2009 - 12:12 AM

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....p?id_product=17

running 1.2.4

Thanks again for the help

#7 hawaii350

    PrestaShop Apprentice

  • 07 Oct 2009
  • Members
  • PipPip
  • 53 posts

Posted 02 November 2009 - 12:23 AM

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%%' => "

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.


 


Add this repair to your cart if your screen:



  • Is cracked or has inky, black spots



  • Remains white but the iPod still functions



  • Does not turn on at all but the iPod still functions



  • Turns on but is dim and very hard to see (no backlight)


 


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:



  • Pay the difference in price to have the logic board replaced



  • Have your iPod returned and receive a refund minus the standard diagnostic fee ($4.95)



 


If you have any custom engravings please click here


 


90 Day Limited Warranty


"
);
?>


#8 swguy

    PrestaShop Apprentice

  • 09 May 2009
  • Members
  • PipPip
  • 95 posts
  • Location:Tampa, Florida

Posted 02 November 2009 - 12:26 AM

Something like this:


"




has no hope of working. :) Be sure to escape inner quotes. It's best to use single quote to wrap the string, and double quote inside, escaping as required.
That Software Guy - http://www.thatsoftwareguy.com
My Mods: Better Together, Boilerplate Description, Sort order in CMS
http://www.thatsoftw...prestashop.html

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

#9 hawaii350

    PrestaShop Apprentice

  • 07 Oct 2009
  • Members
  • PipPip
  • 53 posts

Posted 02 November 2009 - 12:35 AM

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 :) Works like a charm now!

Thanks again,
Hawaii350

#10 cerberus22

    PrestaShop Apprentice

  • 02 Jan 2009
  • Members
  • PipPip
  • 275 posts

Posted 17 November 2009 - 07:53 AM

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
Using Prestashop V1.1

#11 hawaii350

    PrestaShop Apprentice

  • 07 Oct 2009
  • Members
  • PipPip
  • 53 posts

Posted 11 March 2010 - 11:52 PM

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!

#12 CrystalPhoenix

    PrestaShop Newbie

  • 19 Feb 2011
  • Members
  • Pip
  • 12 posts

Posted 19 March 2011 - 03:44 PM

Using v1.4 but can't find the "install" in Administration? Also - does it not work on short description? That's where I seem to be typing the same words over & over...





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users