I'm a long time lurker on the forums, many thanks to everyone who contributes here as you've solved many problems for me over the years! I have finally got something I can't solve from searching alone - I have found bits and bobs of info but some is outdated.

Basically, what I want to do
is create a new Option Type - called Calendar. I'm going to pinch the javascript calendar from the Featured Products admin, allowing customers to select date as an attribute. I plan to base this Calendar Option Type on the Text Option Type. No pricing adjustment is required for the new type, so I can do away with the pricing by letter that the text option type uses.

So far I have:

  • Added the Option Type to db table products_options_types
  • Added an entry for PRODUCTS_OPTIONS_TYPE_CALENDER in the db configuration table


These two steps mean the new Calendar Option Type shows in admin, but I now need to add the code to handle things.

What I need to know is every file I need to modify in order to have this new option type function correctly.

I've looked at the installation procedure for Value GV-Mod, which creates a new option type allowing customers to set the value of a gift voucher. For this mod the following files are modified..

/admin/attributes_controller.php
/admin/option_name.php
/admin/options_name_manager.php

/includes/classes/shopping_cart.php
/includes/functions/functions_lookups.php
/includes/modules/attributes.php
/includes/modules/pages/gv_send/header_php.php
I'm assuming the bottom file is irrelevant to my cause, but can anyone tell me if I have to modify all of the other files, or whether any others can be eliminated?

Any other information that may help me on my quest is also hugely appreciated. I'm an XHTML/CSS guy, not a PHP/SQL guy, so I'm working this out as I go along.

Thanks for your time.