Announcement

Collapse
No announcement yet.

Can I make my 'Special Delivery Instructions' required for one of my shipping classes

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

    Can I make my 'Special Delivery Instructions' required for one of my shipping classes

    To make your 'special delivery instructions' (on the 'Invoice Address Page' of checkout) required depending on the class chosen, you need to do the following:

    * open OrderScript.pl in the site directory with a text editor such as 'notepad' (take a backup of the file first)

    * Search for the first instance of:

    if ($$::g_pSetupBlob{MAKE_SHIPPING_CHARGE} &&

    * insert the following on a line directly before the above:

    my $sShipClassName;

    * then find the first instance of:

    my @Response = ActinicOrder::CallShippingPlugIn();

    * and insert the following on a line directly after the above:

    $sShipClassName = $Response[5]; # saving the shipping class name

    * then find:

    if ($bActuallyValidate &&
    (ACTINIC::IsPromptRequired(2, 1)&&
    $::g_ShipInfo{'USERDEFINED'} eq "")

    * and change it to:

    if ($bActuallyValidate &&
    (ACTINIC::IsPromptRequired(2, 1) ||
    $sShipClassName =~ /courier/i) &&
    $::g_ShipInfo{'USERDEFINED'} eq "")


    The above will make the 'special delivery instructions' required for any class with 'courier' in the name. You could enter the exact name of the class if it is specific to only one class.

    * save the file and update the site.
Working...
X