Announcement

Collapse
No announcement yet.

Default Delivery Date

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

    Default Delivery Date

    Under V5 the default delivery date would always default to todays date.

    I was able to modify the Shopping Cart.pl file and add +1 to the day value as most of my products ship over night.

    In my test V6 site the default date is default to 1st Jan 2000 - does anybody know how I can change this to today?

    #2
    The best solution I can give you at the moment is to wait until the next maintenance release of the software (due in a few weeks) where the date drop-downs will work again as they did in v5.

    Sorry about the hassle caused.

    Comment


      #3
      Just bringing this thread back to life with a query.

      Currently when you click on a product in our store the delivery date option is defaulting to 1 January 2004. Is it possible to change this so it displays todays date? (customers can get same day or next day delivery). It seems a little odd if the customer can pick a date in the past. Any tips guys? Thanks a lot.

      Comment


        #4
        Originally posted by Perfect Eye
        Just bringing this thread back to life with a query.

        Currently when you click on a product in our store the delivery date option is defaulting to 1 January 2004. Is it possible to change this so it displays todays date? (customers can get same day or next day delivery). It seems a little odd if the customer can pick a date in the past. Any tips guys? Thanks a lot.

        Is this a V6 problem still?

        Comment


          #5
          Yes it is a v.6 thing. We got the CD ROM off of our client who bought version 6 a while ago, so we have to work with that. Is there a known prob relating to this issue?

          Comment


            #6
            Hi,

            You cannot use 'Quantity on Product Page' as the shopping mode if you want to default to todays date. 'Quantity on Confirmation Page' defaults to todays date as standard - this has been the same through previous versions of actinic. If you want to use 'Quantity in Shopping Cart' as your shopping mode then you will need to make a change to the ShoppingCart.pl file (found in your site folder).

            Open this file in a text editor and search for:

            Code:
            # Date prompt?
            You should see:

            Code:
            if ($bDateExists)
                    {
                    my $sYear       = $::g_InputHash{"Y_" . $ProductRef};
                    my $sMonth      = $::g_InputHash{"M_" . $ProductRef};
                    my $sDay        = $::g_InputHash{"DAY_" . $ProductRef};
            Add the following after the above:

            Code:
                    if ($sYear eq "")
                            {
                            my $now = time;
                            my @now = gmtime($now);
                            $sDay = $now[3];
                            $sMonth = $now[4] + 1;
                            $sYear = $now[5] + 1900;
                            }
            Save and close the file and update the site.

            To set it to tomorrows date:

            - for 'Quantity on Confirmation Page', in the same .pl file, search for:

            Code:
            $Date[0] = $now[3];
            and change it to:

            Code:
            $Date[0] = $now[3] + 1;
            - for 'Quantity in Shopping Cart', search for:

            Code:
            $sDay = $now[3];
            and change it to:

            Code:
            $sDay = $now[3] + 1;
            The 'Quantity on Product Page' is not generated from a perl script so cannot be changed.
            ********************
            Tracey
            SellerDeck

            Comment


              #7
              Hi, thanks for the code Tracey, i tried implementing the code so that todays date is displayed in the shopping cart but it only changed the day number and not the month, so its half solved which is progress, any other additions/pointers?

              Comment


                #8
                Hi,

                Hmm, this is very strange. When I tested it yesterday I am positive that it worked. I've just tried it again and it doesn't . I've put it back through to the development team and will post as soon as I hear from them.
                ********************
                Tracey
                SellerDeck

                Comment


                  #9
                  Hi,

                  Sorry but there is a slight mistake in the above code. I will set it out again, for the 'Quantity in Shopping Cart' mode so you may want to replace your ShoppingCart.pl file from the 'c:\program files\actinic ecommerce v6\Original' folder and then re-apply the following changes:

                  Search for '# Date prompt?' and you should see:

                  Code:
                  if ($bDateExists)
                          {
                          my $sYear       = $::g_InputHash{"Y_" . $ProductRef};
                          my $sMonth      = $::g_InputHash{"M_" . $ProductRef};
                          my $sDay        = $::g_InputHash{"DAY_" . $ProductRef};
                          $sMonth = $::g_MonthMap{$sMonth};
                  Add the following directly after the above:

                  Code:
                          if ($sYear eq "")
                                  {
                                  my $now = time;
                                  my @now = gmtime($now);
                                  $sDay = $now[3];
                                  $sMonth = $now[4] + 1;
                                  $sYear = $now[5] + 1900;
                                  }
                  To make the default tomorrow, in the above, change...

                  Code:
                  $sDay = $now[3];
                  to...

                  Code:
                  $sDay = $now[3] + 1;
                  ********************
                  Tracey
                  SellerDeck

                  Comment

                  Working...
                  X