Announcement

Collapse
No announcement yet.

Other Info (OtherInfo) readonly in shopping cart

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

    Other Info (OtherInfo) readonly in shopping cart

    How may I make the standard 'other info prompt' readonly in the shopping cart?

    Thank you
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk

    #2
    Here are 2 ways:

    1) Perl patching.
    Edit ActinicOrder.pm (in your site folder) and look for:
    Code:
            my $sStyle;
            if (defined $bHighLight &&
                $bHighLight == $::TRUE)
                {
                $sStyle = " style=\"background-color: $::g_sErrorColor\"";
                }
    Replace the first line above (leave other lines) with:
    Code:
            my $sStyle = ' style="border:none;" readonly';
    Remember to re-do this if you update SellerDeck to a new version.

    2) JavaScript / jQuery browser fix.
    Put this in the bottom of View Cart Bulk Area RWD:
    Code:
    <script type="text/javascript">
        $( "input[name^='O_']" ).not( "[style]" ).prop('readonly', true).css('border', 'none');
    </script>
    Both are slightly complicated by the need for the Other Info to be editable if it's erroneously empty.
    So I've kept them as input fields but made them read-only and hidden the border unless they're empty.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Thank you Norman - excellent. Much appreciated.
      Jonathan Chappell
      Website Designer
      SellerDeck Website Designer
      Actinic to SellerDeck upgrades
      Graphicz Limited - www.graphicz.co.uk

      Comment


        #4
        You're welcome. The Forum has been so quiet that it's nice to have something to do.

        Here are 2 ways that improve on my earlier post:

        1) Perl patching.
        Edit ActinicOrder.pm (without prior mods - in your site folder) and look for:
        Code:
        		$sHTML = ACTINIC::GetPhrase(-1, 2161, "", $sIndex, 35, 1000, $sValue, $sStyle);
        Replace it with
        Code:
        		if ( $sStyle )
        			{
        			$sHTML = ACTINIC::GetPhrase(-1, 2161, "", $sIndex, 35, 1000, $sValue, $sStyle);			# error prompt must be editable
        			}
        		else
        			{
        			$sHTML = '<input type="hidden" name="' . $sIndex . '" value="' . $sValue . '"/>' . $sValue;	# hide valid prompt
        			}
        2) JavaScript / jQuery browser fix.
        Put this in the bottom of View Cart Bulk Area RWD:
        Code:
        <script type="text/javascript">
            $( "input[name^='O_']" ).not( "[style]" ).attr('type', 'hidden').each(function(){$(this).after($(this).val());});
        </script>
        Both are slightly complicated by the need for the Other Info to be editable if it's erroneously empty.
        So I've kept them as input fields but made them hidden unless they're empty.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment

        Working...
        X