bedfordprint Posted August 28, 2014 Share Posted August 28, 2014 If you add a category and add an image, complete all the fields and click save, picture uploads but is not automatically assigned to the category. You need to go to edit and click the image you want and save. The error from the log is: File: [index.inc.php] Line: [6] "ALTER TABLE `retCubeCart_inventory` ADD `upload_images` TINYINT( 1 ) NOT NULL" - Duplicate column name 'upload_images' Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 28, 2014 Share Posted August 28, 2014 Something is not quite right. In a stock CubeCart v5, there is no file named index.inc.php. The file name will be something like, categories.index.inc.php. This might be a mod (perhaps, where the customer can upload a personal image to be affixed to the product?). Thus, the mod will be wanting to alter the database. The error is originating from the mySQL database. Yes, the image is not automatically assigned to the newly added category (or newly added product when adding products). I suppose, however, that an assumption can be made. (I'll experiment with this.) Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 28, 2014 Share Posted August 28, 2014 Try this. In /admin/sources/categories.index.inc.php, near line 69 (for CC5213):Was: } else { if (!empty($_POST['cat']['cat_name']) && $GLOBALS['db']->insert('CubeCart_category', $_POST['cat'])) { Now: } else { $_POST['cat']['cat_image'] = (int)$file_id; if (!empty($_POST['cat']['cat_name']) && $GLOBALS['db']->insert('CubeCart_category', $_POST['cat'])) { Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.