Announcement

Collapse
No announcement yet.

Adding Values to order details

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

    Adding Values to order details

    Hi,

    We have recently been working on a way of including different values with a customers order depending on fields like the shipping method chosen and the delivery country. This is necessary so that these values can be passed to our courier company and their software knows how to deal with the shipment.

    At first with the help of Kermy this was achieved through the use of Javascript which would look at the customers input information and then assign a value which i can specify to an unused field in their order (i.e at present we don't use the INVOICEUSERDEFINED field or the INVOICEFAX field). If you would like to see what was done please see this thread http://community.actinic.com/showthread.php?t=27846

    Basically the latest problem is that its not working on all orders as some customers have javascript disabled and therefore nothing happens. I was hoping that someone might be able to help with how this sort of functionality could be built in perl so it takes place on the server side.

    If anyone can help then a solution which would be able to read from the shipping option select drop down box and take the selected value and another solution which could read from the input in the delivery country field is what we need. We would then need to be able to specify what value should be assigned depending on what option has been input in both these places, and also where this value should be assigned. At present all the fax fields and userdefined fields are empty so if we can place these new values in those then they can be downloaded with the order and exported to our courier.
    Regards,

    Guy

    #2
    Guy,

    I will have to run this past development to see what best can be done. I will update when I hear from them.

    Kind regards,
    Bruce King
    SellerDeck

    Comment


      #3
      Guy,

      I have something for you.

      Edit OrderScript.pl, open the file with notepad
      Search for 'sub ValidateShipContact' you will see...
      sub ValidateShipContact
      {
      replace the above with...

      sub ValidateShipContact
      {
      my %FaxConvert;
      $FaxConvert{'6'} = '206';
      $FaxConvert{'7'} = '207';
      $FaxConvert{'8'} = '208';
      $FaxConvert{'9'} = '209';
      $FaxConvert{'10'} = '210';
      $FaxConvert{'11'} = '211';
      my $sFax = $FaxConvert{$::g_ShipContact{'FAX'}};
      Adjust the above list according to the required shipping class ID translations.

      Search for 'clean up the input' you will see
      #
      #
      # clean up the input
      #
      replace the above with...
      $::g_ShipContact{'FAX'} = $sFax;
      #
      #
      # clean up the input
      #
      Search for 'sub DisplayReceiptPhase' you will see...
      sub DisplayReceiptPhase
      {
      replace the above with...
      sub DisplayReceiptPhase
      {
      $::g_ShipContact{'FAX'} = "";
      Save and Exit
      Update the web site

      Please make a complete backup before attempting to make script changes. If something should go wrong, an original copy of the script is available within the 'Original' folder of your Actinic installation. Copy the script back into your site folder to revert to original.

      Kind regards,
      Bruce King
      SellerDeck

      Comment

      Working...
      X