WillBoss Posted October 21, 2005 Share Posted October 21, 2005 Hi I am setting up a website template site and I currently have the Download option enabled. I have set this in the 'Products Attributes' panel for one template as a test. Under 'Option Name' I have given it the title 'Download' and I have associated 'Yes' to it in the 'Option Values' panel. This seems to work fine but I now want to add another option for the said template. The option I want to add is to give the customer the option to have the template modified for 30 euro. I tried to set this option up by doing the following: In 'Product Options' I have set up 'Option Name' called 'Template Modifications' and in 'Option Values' I have given this values 'No' and 'Yes'. I then associated it with the template given the value 'No' a 0.00 value and the potion value 'Yes' 30.00 value. When I try to purchase the product and select the value 'No' and then proceed to the checkout I am getting the following error: Fatal error: Cannot redeclare tep_show_category() (previously declared in /shop/includes/header.php:173) in /shop/includes/boxes/categories.php on line 13 I have tried to remove the value 'Yes' for the 'Template Modifications' option but it still gives me the above error. Although the 'Yes' option works!! Any suggestions would be appreciated as its driving me mad. Regards Will Link to comment Share on other sites More sharing options...
JimmyQ Posted October 21, 2005 Share Posted October 21, 2005 I havent had that problem but I am having trouble adding another option. I wanted the buyer to have the option to have the product installed for a fee which is similar to what you are doing with your Modifications. If you or anyone has any ideas please share them. :thumbsup: Link to comment Share on other sites More sharing options...
WillBoss Posted October 21, 2005 Author Share Posted October 21, 2005 I wouldnt be the best person to be asking about adding options to products. I thought I had it sussed but this error message I am getting had confused even more. I wouldnt mind but I was sure that it was working next minute the tax was been added to products and then the tax was been added again. Tax on Tax. Then it came right again but this error messahe appeared. Actually come to think of it, I had the tax to be included and displayed for each product. Now it isnt doing that. I wonder are these problems connected?? :-" Will Regards Will Link to comment Share on other sites More sharing options...
JimmyQ Posted October 22, 2005 Share Posted October 22, 2005 I guess its just you and I are going to have to figure this out. Its amazing how some topics just go unanswered. Maybe our questions are just stupid and dont warrent the attention of the experts. I came across a website that may be of interest to you WillBoss. It was * offsite link to oscommerce related service They have flash animations on how to add attributes. Unfortunately they only add one set of attributes to a product. I am not even sure if you are allowd to add 2 different options. Jim Link to comment Share on other sites More sharing options...
WillBoss Posted October 22, 2005 Author Share Posted October 22, 2005 Hi Jimmy My problem is getting worse. The error is now coming up even if I take out completely the options of 'Template Modifications'. I think I am going to have to reinstall the entire program again. Please dont make me have to do this drastic step. >_< Thanks for the link by the way. They were the exact steps I followed. There most be someone out there that can help me / us. Mod 'Johnson' is a nice guy can you help??? Regards Will Link to comment Share on other sites More sharing options...
Guest Posted October 22, 2005 Share Posted October 22, 2005 When I try to purchase the product and select the value 'No' and then proceed to the checkout I am getting the following error: Fatal error: Cannot redeclare tep_show_category() (previously declared in /shop/includes/header.php:173) in /shop/includes/boxes/categories.php on line 13 Its curious that you get this error when you select an option, but it is not the direct cause of your problem. You have a modification in your /includes/header.php which declares the following function: function tep_show_category($counter) { global $tree, $categories_string, $cPath_array; for ($i=0; $i<$tree[$counter]['level']; $i++) { $categories_string .= " "; } $categories_string .= '<font size="2"><a href="'; if ($tree[$counter]['parent'] == 0) { $cPath_new = 'cPath=' . $counter; } else { $cPath_new = 'cPath=' . $tree[$counter]['path']; } $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">'; if (isset($cPath_array) && in_array($counter, $cPath_array)) { $categories_string .= '<b>'; } // display category name $categories_string .= tep_image(DIR_WS_ICONS . 'arrow.gif') . ' ' . $tree[$counter]['name']; if (isset($cPath_array) && in_array($counter, $cPath_array)) { $categories_string .= '</b>'; } if (tep_has_category_subcategories($counter)) { $categories_string .= '->'; } $categories_string .= '</a>'; if (SHOW_COUNTS == 'true') { $products_in_category = tep_count_products_in_category($counter); if ($products_in_category > 0) { $categories_string .= ' (' . $products_in_category . ')'; } } $categories_string .= '<br></font>'; if ($tree[$counter]['next_id'] != false) { tep_show_category($tree[$counter]['next_id']); } } This function is taken from /includes/boxes/categories.php I would suggest renaming the function in header.php - eg 'tep_show category2' - I suggest renaming it rather than removing the one in categories.php as the one in the header is probably modified - don't forget to rename tep_show_category at the bottom of the function also and wherever else it is referenced in your header. Matti Link to comment Share on other sites More sharing options...
WillBoss Posted October 23, 2005 Author Share Posted October 23, 2005 Hi Johnson I have actually reinstalled osCommerce last night as I was only after setting it up the system anyway. It was strange the way everything went wrong at the same time e.g. my Tax caluclations etc. Anyway everything seems to be fine now but I will keep your advice on record just in case the problem reoccurs. Cheers! Will Regards Will Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.