Announcement

Collapse
No announcement yet.

Can I make the Date Prompt optional?

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

    Can I make the Date Prompt optional?

    If you have a date prompt on your products but it's not always necessary for a customer to choose a date then you can use the following script change to stop it from showing the default date in the basket:

    * browse to your site folder and locate 'ActinicOrder.pm'

    * open this file in a text editor such as notepad

    * search for:

    if (length $$pProduct{'DATE_PROMPT'} > 0) # if the date is defined, add it to the table

    * change it to:

    if (length $$pProduct{'DATE_PROMPT'} > 0 && # if the date is defined, add it to the table
    defined $CurrentItem{"DATE"})

    * then search for:

    $bDateExists = (length $$pProduct{"DATE_PROMPT"} != 0); # see if the date field exists

    * change it to:

    $bDateExists = (length $$pProduct{"DATE_PROMPT"} != 0) && defined
    $$pOrderDetails{"DATE"}; # see if the date field exists

    * close and save that file

    * then open 'ShoppingCart.pl in a text editor and search for:

    $Values{"DATE"} = sprintf("%4.4d/%2.2d/%2.2d", $sYear, $sMonth, $sDay);

    * replace this with:

    my $sDateTmp = sprintf("%4.4d/%2.2d/%2.2d", $sYear, $sMonth, $sDay);
    if ($sDateTmp != "0000/00/00")
    {
    $Values{"DATE"} = $sDateTmp;
    }

    * close and save the file

    * then within the software you need to go to the 'Design' menu and select 'Library'

    * on the 'Layouts' tab expand the 'Day List' group and double-click on the 'Standard Day List' layout to edit it

    * click on the 'Click here to edit list layout settings' link

    * add the following to the end of the 'Start of List' field:

    <option></option>

    * click 'OK'

    * do the same for the 'Standard Month List' and the 'Standard Year List' layouts

    * update your site.

    Your date prompts will now not show a date and the customer must select the dates from the drop-down boxes to show a date in the cart. If they are left blank then the date prompt will not be used.

    When you download the order and view the line item, there will be a date in the date prompt field (normally today's date) but the check box will not be ticked.

    SellerDeck is not able to provide any detailed support for script changes made. If you find that there is a problem, an original copy of the script can be found within the 'Original' folder in your installation. Copy this into your site folder.
Working...
X