kplace Posted January 4, 2013 Posted January 4, 2013 I found this contribution http://addons.oscommerce.com/info/160 for v 2.2. I am using version 2.3 and I really need to figure out how to have a date as a product attribute. The instructions say: ---------------------------------------------------------------- INSTALLATION ---------------------------------------------------------------- Open /catalog/product_info.php ----------------------- FIND: (around line 60) </head> REPLACE with <link rel="stylesheet" href="datepicker/jquery.ui.all.css"> <link rel="stylesheet" href="datepicker/demos.css"> <link rel="stylesheet" href="datepicker/themes/ui-lightness/jquery.ui.datepicker.css"> <script src="datepicker/jquery-1.5.1.js"></script> <script src="datepicker/jquery.ui.core.js"></script> <script src="datepicker/i18n/jquery.ui.datepicker-fr.js"></script> <script src="datepicker/jquery.ui.datepicker.js"></script> <script> $(function() { $( "#datepicker" ).datepicker(); }); </script> </head> ---------------------- FIND: (around line 189) $tmp_html = '<input type="text" name ="id[' . TEXT_PREFIX . $products_options_name['products_options_id'] . ']" size="' . $products_options_name['products_options_length'] .'" maxlength="' . $products_options_name['products_options_length'] . '" value="' . $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$products_options_name['products_options_id']] .'"> ' . $products_options_name['products_options_comment'] ; REPLACE with: $tmp_html = '<input type="text" id="datepicker" name ="id[' . TEXT_PREFIX . $products_options_name['products_options_id'] . ']" size="' . $products_options_name['products_options_length'] .'" maxlength="' . $products_options_name['products_options_length'] . '" value="' . $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$products_options_name['products_options_id']] .'"> ' . $products_options_name['products_options_comment'] ; I don's see the code below in 2.3 $tmp_html = '<input type="text" name ="id[' . TEXT_PREFIX . $products_options_name['products_options_id'] . ']" size="' . $products_options_name['products_options_length'] .'" maxlength="' . $products_options_name['products_options_length'] . '" value="' . $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$products_options_name['products_options_id']] .'"> ' . $products_options_name['products_options_comment'] ;
Bob Terveuren Posted January 4, 2013 Posted January 4, 2013 Hi I don't recognise the $tmp_html as being anywhere in a standard product_info.php so I'm guessing that you'll have to download an earlier (and full) version of option type and then factor in the changes that you have detailed. You'll also need to edit the <head> stuff as 2.3 already has jQuery installed so a double call to it is not going to work.
Guest Posted January 4, 2013 Posted January 4, 2013 @@kplace I suggest looking at the 2.3.x version of that contribution HERE Chris
kplace Posted January 5, 2013 Author Posted January 5, 2013 @@kplace I suggest looking at the 2.3.x version of that contribution HERE Chris Hi Chris, I have that one installed but it does not tell me how to add a date field. Sonya
kplace Posted January 6, 2013 Author Posted January 6, 2013 Hi Chris, I have that one installed but it does not tell me how to add a date field. Sonya @@DunWeb
Guest Posted January 6, 2013 Posted January 6, 2013 @@kplace Here is the support thread for that contribution. I do believe if you look, there are posts about the date field. Chris
Recommended Posts
Archived
This topic is now archived and is closed to further replies.