Announcement

Collapse
No announcement yet.

Product Short Description split over two lines. How??

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Product Short Description split over two lines. How??

    Hi. We are trying to split the Short Description for some products over two lines to tidy them up. Can't find a way to do it. Any suggestions?
    Thanks for any help.
    Ted

    #2
    The only way to do this directly is to add embedded HTML to the descriptions. E.g.

    Line1!!<<br>>!!Line2

    This will display as desired on the Product pages, cart and checkout.

    However the !!<<br>>!! will show up in the Order, Printed Reports, and probably the Customer Email, unless some patches are made to OrderScript.pl to detect these patterns and replace them with new lines.

    It also used to be the case that you could Import Descriptions containing line feeds but that's probably not how you build your products.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Here's the patch to strip those !!<<br>>!! fragments.
      Code:
      Edit OrderScript.pl (back it up first - use a text editor, not a word processor).
      
      Look for the line
      
      		$objOrderBlob->AddString($sNameTemp);					# the product description
      
      Replace with
      
      		my $sNameTemp = $$pProduct{"NAME"};					# the product description
      		$sNameTemp =~ s/!!<|>!!//g;						# strip HTML escapes
      		$sNameTemp =~ s/<br>/\r\n/ig;						# replace <br> with cr/lf
      		$objOrderBlob->AddString($sNameTemp);					# the tidied product description
      
      
      Look for the 2 lines
      
      			MailOrderLine( $$pProduct{REFERENCE},
      								$$pProduct{NAME},
      
      Replace these 2 lines with
      
      			my $sNameTemp = $$pProduct{"NAME"};					# the product description
      			$sNameTemp =~ s/!!<|>!!//g;						# strip HTML escapes
      			$sNameTemp =~ s/<br>/\r\n/ig;						# replace <br> with cr/lf
      			MailOrderLine( $$pProduct{REFERENCE},
      								$sNameTemp,			# the tidied name
      Note that additional patching will be needed if you use products containing line breaks as components.

      You'll also have to redo this patch if you upgrade Actinic as the Perl scripts get changed then.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Thanks, Norman

        Thanks for the advice. When it comes to changing scripts or writing html, I'm a scaredy-cat of the first order, but if I do it carefully and follow your guidance to the letter, it sounds like it will give us exactly what we are looking for.

        Big gulp, big gin, and I'm going for it (tomorrow).

        Thanks again.

        Ted

        Comment

        Working...
        X