Announcement

Collapse
No announcement yet.

Format "Choice Name"? (not "html for name")

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

    Format "Choice Name"? (not "html for name")

    Hi

    I thought I had successfully added formatting to the "Choice Name" field. This meant that my Choice Name - which I use for individual sizes of my herbal products, eg 10 capsules, 200 capsules, etc - appeared in the shopping cart more attractively instead of the default text size which is a little large.

    UNFORTUNATELY, the confirmation email doesn't play ball, and describes the person's purchase to include the html code, eg:

    "<span style="font-size:11px;"><b>90-day Lung Programme with Capsules</b> (1 x 30 day pack)</span>"

    ______________________

    Has anyone been able to format the Choice Name so it looks nice in the shopping cart, and have the confirmation email look ok too?

    Actinic helpdesk can't come up with anything.

    Thanks

    Malcolm

    #2
    Try this (untested):
    Edit OrderScript.pl (in your Site folder - back it up first)

    Look for
    Code:
    			MailOrderLine( $pComponent->{'REFERENCE'},
    								$pComponent->{'NAME'},
    Replace with
    Code:
    			my $fixedname = $pComponent->{'NAME'};
    			$fixedname =~ s/<.*?>//g;		# strip HTML tags
    			MailOrderLine( $pComponent->{'REFERENCE'},
    								$fixedname,

    There are two occurences of this in OrderScript.pl so do both.

    Also check your downloaded order as this may contain the unwanted code too.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Quick reply!

      Hi Norman
      Quick reply or what?

      Many thanks - will try it and let you know.

      Malcolm

      Comment


        #4
        Update on Norman's fix

        Hi Norman

        You are definitely on the right track.

        Have tested with two different tag series'.

        1:
        <span style="font-size:11px;"><span style="font-weight:bold;">Colon Programme with Drops</span> (1 x 30-day pack) </span>

        in Choice Name produces:

        <span style="font-weight:bold;">Colon Programme with Drops</span> (1 x 30-day pack) </span>

        and

        2:
        <span style="font-size:11px;"><b>Colon Programme with Drops</b>
        (1 x 30-day pack) </span>

        in Choice Name produces:
        <b>Colon Programme with Drops</b> (1 x 30-day pack) </span>

        So it looks like the first tag only is being removed.

        Any further input would be very much appreciated.

        Malcolm

        Comment


          #5
          Oops. Forgot to make that strip tags global. I've amended post #2 above to do that.

          Change the line
          Code:
          $fixedname =~ s/<.*?>//;		# strip HTML tags
          to
          Code:
          $fixedname =~ s/<.*?>//g;		# strip HTML tags
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Sorted - thanks.

            Hi Norman

            That's great - what a difference a 'g' makes.

            The products look so much better in the shopping cart now I can format them.

            Can I send you a bottle for Christmas? (I'm serious) It would be my pleasure. If you drink, of course.

            Best

            M

            Comment

            Working...
            X