Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Date as Product Attribute


kplace

Recommended Posts

Posted

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'] ;

Posted

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.

Posted

@@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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...