osCmax v2.5 User Manual
Results 1 to 6 of 6

Date and free text entry on order

This is a discussion on Date and free text entry on order within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Hi, I am setting up a shopping site using OSCommerce shopping cart Version 2.2ms2-060817. I have installed/configured the contribution - ...

      
  1. #1
    Lurker
    Join Date
    Nov 2008
    Posts
    3
    Rep Power
    0


    Default Date and free text entry on order

    Hi,
    I am setting up a shopping site using OSCommerce shopping cart Version 2.2ms2-060817. I have installed/configured the contribution - Options Types.
    The shopping site that I am creating will allow customers order refreshments for meeting rooms that they have already booked elsewhere.
    I am trying to create a 'Product' that will allow customers to enter the date of their booking and possibly enter free text for other information.
    Can anyone advise how I can create an entry field to capture a date and also how I can configure an option box to allow the entry of free text.
    Any advice welcome but please give me easy to follow steps! Thanks in advance.

  2. #2
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,699
    Rep Power
    22


    Default Re: Date and free text entry on order

    OTF already has a built in "free text feild" option.

    To add - say a date field would not be that hard. Follow much the same as what the text input would be - use HTML date - or use a JAVA calender if you wished. How you store that is a bit more tricky - convert it to TEXT or save as a date variable. Maybe a little date validation would be in order - say nothing next day or in the past - and maybe a MAX time span....like 100 or 365 days.
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

  3. #3
    Lurker
    Join Date
    Nov 2008
    Posts
    3
    Rep Power
    0


    Default Re: Date and free text entry on order

    Hi jpf,

    thanks for coming back to me. I am still struggling to set up the free text entry box, I know that I need to set up a new attribut in 3 stages,
    Stage 1 create the Product Option, this is where I have selected Text as my option type.

    Stage 2, Create my option values, this is where I would normally create standard options e.g. Meeting Room 1, Meeting Room 2, Meeting Room 3 etc but in this case I do not want to suggest any standard text but allow my customers free entry.

    Stage 3, Products Attributes where I tie the above 2 bits to a product.
    If I create an option and leave the option value blank and then add it to a product in Product Attributes I get a blank drop down box, what I really want is a box of a specific width that the customer would type into.
    If I can get this to work I can also use it to ask customer for date of meeting.

    Is there any other contribution that would do all the hard work for me on the date entry front as I think I will struggle with the coding to build this in.

    As always, thanks for your help,

  4. #4
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,699
    Rep Power
    22


    Default Re: Date and free text entry on order

    I think you missed a step in doing this. Should shoulkd be selecting the free text option then puting in "Orginization:" or "Name to engrave:" etc... then should allow text input. If there is a drop down box then your seting up the attrib incorrectly or you did not properly install this into oscommerce.

    MS2MAX v1.7 (oscmax) had this built in - but support for that version has expired a few years ago. Support in 2.X was dropped in favor or Quanity Tracking Pro (but it broke/incompatable with Option Type)
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

  5. #5
    Lurker
    Join Date
    Nov 2008
    Posts
    3
    Rep Power
    0


    Default Re: Date and free text entry on order

    Hi,

    thanks for coming back to me, I do not have an option for Free Text in my drop down list, only Text, Radio, Checkbox, and Textarea as you say I must have missed a trick when doing the install.
    I have double checked the contribution I have added, it is: product_attributes_option_type_2.01
    When I look at the install details for the file products_attributes.php I can see this in the amendments to add:

    // OTF contrib begins
    //CLR 030312 add function to draw pulldown list of option types
    // Draw a pulldown for Option Types
    function draw_optiontype_pulldown($name, $default = '') {
    $values = array();
    $values[] = array('id' => 0, 'text' => 'Select');
    $values[] = array('id' => 1, 'text' => 'Text');
    $values[] = array('id' => 2, 'text' => 'Radio');
    $values[] = array('id' => 3, 'text' => 'Checkbox');
    return tep_draw_pull_down_menu($name, $values, $default);
    }
    //CLR 030312 add function to translate type_id to name
    // Translate option_type_values to english string
    function translate_type_to_name($opt_type) {
    if ($opt_type == 0) return 'Select';
    if ($opt_type == 1) return 'Text';
    if ($opt_type == 2) return 'Radio';
    if ($opt_type == 3) return 'Checkbox';
    if ($opt_type == 4) return 'Textarea';
    return 'Error ' . $opt_type;
    }
    // OTF contrib ends


    Which clearly doesn't have an option for Freetext, have I installed the wrong contribution?

    I can easily add the option to the drop down box but of course OSCommerce does not know how to deal with this.

    I can see other sections in the /catalog/product_info.php which have code such as:

    case PRODUCTS_OPTIONS_TYPE_TEXTAREA

    so I can see that there is more to it than just having the option in the drop down.

    Sorry but I am a complete numpty at this and seem to be asking very silly questions. Any suggestions as to how I can add this extra option?


    Thanks again.

  6. #6
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,699
    Rep Power
    22


    Default Re: Date and free text entry on order

    text...text area...free typeable text area...

    No need to add - it already there - just select the TEXT option.
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

Similar Threads

  1. Add date and order number to invoice and packing slip
    By michael_s in forum New osCommerce Contributions
    Replies: 1
    Last Post: 10-21-2008, 05:15 PM
  2. Add date and order number to invoice and packing slip
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 02-13-2007, 10:11 AM
  3. please giv me advise for upgrading Step-By-Step Manual Order Entry 1.8
    By jikey in forum osCmax v2 Customization/Mods
    Replies: 1
    Last Post: 12-09-2006, 03:00 AM
  4. Text Attribute not included on order
    By DerekJ in forum osCmax v1.7 Discussion
    Replies: 5
    Last Post: 03-19-2005, 05:40 AM
  5. Create an Order for New Customer For FREE access to "Fi
    By In-Overtime in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 05-14-2004, 09:33 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •