Announcement

Collapse
No announcement yet.

Formatting Code in Info Prompts show in Cart

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

    Formatting Code in Info Prompts show in Cart

    Hi,

    I am trying to format the text in the Date Info Message in the Date Prompts so that some words are in a smaller font size. I highlighted the text and used the format bar to do this, but when a customer adds the item to the cart it shows the code with the message and looks messy.

    Proper code in layout is:
    Code:
     <span class="actrequired"><actinic:variable formatting="font(Color|e80074),bold" encoding="actinic" name="DatePrompt" /></span><br />
                <actinic:variable name="DayList" /><actinic:variable name="MonthList" /><actinic:variable name="YearList" />
    On the product page it looks as it should do, but in the cart it shows:

    Date to arrive by: !!<(Only guaranteed if Next Day Del chosen at checkout>!!

    (The bit in brackets to be a smaller size 9 font size )

    I have tried taking some and all these bits out, but nothing makes it right and I can't see how to change the layout code to allow for part of the line to be different only all of it.

    Is there a way round this please?

    Thanks
    Helen
    www.postapresent.co.uk
    Gifts by Post & Giftwrapping Service

    #2
    Support have told me the following:-
    Code:
    This is a known bug in the software and here is the workaround you can try –
    
     
    
    NOTE : Note the work round is purely to strip the <img> tag. If there are other tags used that are not removed due to the bug then the work round will need refining.
    
    Edit ActinicOrder.pm (‘C:\Documents and Settings\Administrator\My Documents\Actinic v10\Sites\Site1’) 
    Search for 
    ProcessEscapableText($$pProduct{'NAME'}
    
    
    you should see 
    
    @Response = ACTINIC::ProcessEscapableText($$pProduct{'NAME'});
    
    replace the line with 
    ·         my $sName = $$pProduct{'NAME'};
    
    ·         $sName =~ s/<img.*?>//i;
    
    @Response = ACTINIC::ProcessEscapableText($sName);
    However, it's not an img tag I need removing it is the !!<>!! that is wrapped round the span style tag that I have input to reduce the size of the text in the other infor prompt message. I have tried replacing line $sName =~ s/<img.*?>//i; with variations, but cannot get it to work to strip the span style formatting of the !!< >!!. Do any of you experts have any ideas please?
    Helen
    www.postapresent.co.uk
    Gifts by Post & Giftwrapping Service

    Comment


      #3
      That inline formatting you have added to the variable should be outlawed, wish they'd never added that feature, it's just one big codge when anyone uses that.

      You need to understand the principles of CSS basically to grasp what you need to do here. If you need to style something within a container, you add the styles to the class applied to the container, you don't do inline styling of any sort unless you really have to, 99% of the time inline styling is just bodging things.

      If you have a container like so:

      <span class="myClass">blurb to be styled</span>

      You look to have the styles added to the class called 'myClass' in the above example and do NO inline styling. Your code below seems to have a span defined, but then for some reason you also format the variable, i've not done that in 7 years of design, so you certainly won't need to either.

      When styling move up the hierarchy, look for container that has styling or could be styled and use CSS on that. Don't get into the habit of just adding styling into styling, it's inefficent, bad way of working and sure as damn it will trip you up across the myriad of browsers.

      Comment


        #4
        Thanks for getting back so quick Lee.

        I understand how to style in CSS but surely this will style the whole line? I want some words in 11px and some in brackets in smaller size text, otherwise the line is too long and if I put a break in it to go on 2 lines I have the same issue with the codes showing. Not sure how to do this in CSS or even if it's possible?

        Thanks
        Helen
        www.postapresent.co.uk
        Gifts by Post & Giftwrapping Service

        Comment


          #5
          Sorry, I'm not quite following, you have the actinic embed markers showing and want to get rid of those, I'm not sure why or where they are being used and then you have an input field where you want some of the text to be a different size? How can you part style the input someone adds? Hard to follow code as on BB, but I'm a bit confused anyway?

          Comment


            #6
            Sorry for not being clear.

            On the other info prompt and date prompt tabs on the products, you can add a question or some text that shows above the box where the customer inputs the information. It is the question text that I am trying to style, not what the customer inputs.

            For example, above the date box, I want to say "Date to arrive by: (Only guaranteed if Next Day Del chosen at checkout)

            I am trying to get the text in brackets in a smaller font size than the rest of the sentence otherwise it is all too long and I use the auto styling bar in products which sets it as:

            Date to arrive by: !!<<span style='font-size: 9px;'>>!!(Only guaranteed if Next Day Del chosen at checkout)!!<</span>>!!

            this works fine until the item goes to the checkout and then the !!< >!! show in the checkout. They don't show on the product page, so I don't understand why it changes in the checkout.
            Helen
            www.postapresent.co.uk
            Gifts by Post & Giftwrapping Service

            Comment


              #7
              Thanks I've found a way to resolve it. As I have the same message on all the delivery prompts I've hardcoded what I want in the layout.

              Cheers!
              Helen
              www.postapresent.co.uk
              Gifts by Post & Giftwrapping Service

              Comment

              Working...
              X