shiningfaery Posted September 17, 2010 Share Posted September 17, 2010 your code hasnt fixed my problem. its part of the configured code from the install instructions. I did try fixing it myself to no avail. I have now put it back to what it originally looked like. and get this: Parse error: syntax error, unexpected T_ELSEIF in /home/shoeadd1/public_html/admin/categories.php on line 266 tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array); } elseif ($action == 'update_product') { tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_id . "'"); } } if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } this is the code lines 265 onwards. Any Ideas?? Michaela Quote Link to comment Share on other sites More sharing options...
germ Posted September 18, 2010 Share Posted September 18, 2010 The only way for anyone to help fix your problem is if you post the ENTIRE file. Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
shiningfaery Posted September 18, 2010 Share Posted September 18, 2010 I could do that but the file is huge over 1300 lines of code, it wont go into one post are you sure you want the entire file? Quote Link to comment Share on other sites More sharing options...
germ Posted September 18, 2010 Share Posted September 18, 2010 I'll PM my email address to you and you can send the file to me as an attachment if you want. Otherwise post the code in separate posts as space permits I guess. You can't fix a code error liek this without seeing the entire file becaus the "real error" is somewhere previous in the code and there is now way to tell where without looking the entire file over. Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
shiningfaery Posted September 18, 2010 Share Posted September 18, 2010 I have an idea where the code has gone wrong but I dont know enough to fix so if you pm your email address i can email it to you its so much easier that trying to post in segments. thank you Quote Link to comment Share on other sites More sharing options...
germ Posted September 18, 2010 Share Posted September 18, 2010 Startting at line 256 the code is now: $sql_data_array = array('products_quantity' => (int)tep_db_prepare_input($HTTP_POST_VARS['products_quantity']), 'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model']), 'products_price' => tep_db_prepare_input($HTTP_POST_VARS['products_price']), 'products_date_available' => $products_date_available, 'products_weight' => (float)tep_db_prepare_input($HTTP_POST_VARS['products_weight']), 'products_status' => tep_db_prepare_input($HTTP_POST_VARS['products_status']), 'products_tax_class_id' => tep_db_prepare_input($HTTP_POST_VARS['products_tax_class_id']), 'manufacturers_id' => (int)tep_db_prepare_input($HTTP_POST_VARS['manufacturers_id'])); tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array); elseif ($action == 'update_product') } { tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_id . "'"); } } if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } // BOF: Additional Images // delete old images if necessary Change it to this: $sql_data_array = array('products_quantity' => (int)tep_db_prepare_input($HTTP_POST_VARS['products_quantity']), 'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model']), 'products_price' => tep_db_prepare_input($HTTP_POST_VARS['products_price']), 'products_date_available' => $products_date_available, 'products_weight' => (float)tep_db_prepare_input($HTTP_POST_VARS['products_weight']), 'products_status' => tep_db_prepare_input($HTTP_POST_VARS['products_status']), 'products_tax_class_id' => tep_db_prepare_input($HTTP_POST_VARS['products_tax_class_id']), 'manufacturers_id' => (int)tep_db_prepare_input($HTTP_POST_VARS['manufacturers_id'])); // BOF: Additional Images // delete old images if necessary I removed about 10 lines of code that looked to me like they were in the wrong place (comaparing your code to the unchanged version). BACKUP THE FILE BEFORE YOU MAKE THESE EDITS. Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
shiningfaery Posted September 18, 2010 Share Posted September 18, 2010 Woohoo thank you. I had considered making that same change but as I am not confident in what I was doing I decided against it. Thank you so much for your help. Michaela Quote Link to comment Share on other sites More sharing options...
juiced Posted October 2, 2010 Share Posted October 2, 2010 I have another issue with this contribution which I couldn't find a post of yet in this topic. Surely someone must have encountered this before. Initially my osCommerce installation (running for a year now) was configured on a domain with Safe Mode set to Off. Not good. However, changing this to On, makes this (great) contribution to NOT display my images as configured in either the contribution or the "images" settings in configuration. The images are suddenly showing as big, fat and large as we have uploaded them. Simply changing safe_mode back to off changes the images back to the expectation/configuration. Has anyone encountered this before? We're running on v2.2 RC1, PHP 5.1.6, Apache/2.2.3 and Linux 2.6.18-028stab064.7 thanks, Joost Quote Link to comment Share on other sites More sharing options...
Tabula_Rasa Posted October 6, 2010 Share Posted October 6, 2010 pictures not uploading, deleting, etc. Register_Globals: off (with modification) Safe_Mode: On (with modification) PHP 5.x.x, MySQL 5.x.x (osC modified to work) Server: Linux GoDaddy for development. Although the front end is VERY heavily modified with several contributions and a complete code rewrite to produce tableless XHTML/CSS, the admin is largely untouched except for regular contributions. I do NOT want additional Images to manage widths or heights and believed that not filling in ANY width or height in the Configuration->Images would be ok, but I've tried both ways. In the Configuration->Additional Images, I set to "false" any automatic feature or size feature... and, again, I've fiddled with different configurations, turning things on or off to see if anything was affected. I also tried copying a configuration from this forum that was reported to be working. Nothing. In either the "box" or "new/edit" product, when I "browse" for the images, the filenames show. However, when I "Preview" only one, at most, file successfully uploads and it's random which one is uploading. The "delete" feature seems to work only when it wants to. I've checked and rechecked all files to upload and all files to modify line by line several times: ALL code seems to be up there and correct. If anyone can point me to what the issue might be, that would be wonderful. Thank you. If I can't fix this in a few hours, I'll have to go back to the back-up site and try "Extra Images" instead. :( Quote Link to comment Share on other sites More sharing options...
Medibot3D Posted October 8, 2010 Share Posted October 8, 2010 Hi I installed this contrib yesterday and have struggled to get it working. Im sure it has to be a simple problem. Problem is im more simple when talking php. So in admin when i try to upload an image I get the following errors. Error Failed to create directory /data/www/vhosts/theresistancestore.com/httpdocs/backups/catalog/images/products/dvd-movies/. Error This: /data/www/vhosts/theresistancestore.com/httpdocs/backups/catalog/images/products/dvd-movies/ directory is not writable. Attempting to correct... Success Directory permissions on /data/www/vhosts/theresistancestore.com/httpdocs/backups/catalog/images/products/dvd-movies/ was set successfully. Error Failed to create directory /data/www/vhosts/theresistancestore.com/httpdocs/backups/catalog/images/products/dvd-movies/comedy/. Error Error returned from alterimage class: 1 Error Thumb file: /data/www/vhosts/theresistancestore.com/httpdocs/backups/catalog/images/products/dvd-movies/comedy/ab095cf9409347e558f9713a77286226s.jpg could not be created. Error Error returned from alterimage class: 1 Error Products Info file: /data/www/vhosts/theresistancestore.com/httpdocs/backups/catalog/images/products/dvd-movies/comedy/ab095cf9409347e558f9713a77286226m.jpg could not be created. Error Error returned from alterimage class: 1 Error Large file: /data/www/vhosts/theresistancestore.com/httpdocs/backups/catalog/images/products/dvd-movies/comedy/ab095cf9409347e558f9713a77286226l.jpg could not be created. When I go to my images directory /products. The permissions are greyd out I cant change them. The contrib will upload my first main image but i cant add extra images, although the above errors will apear on both. Also the created main image will be set to 777 and again greyd out so i cant change it. Any one know what ive done wrong. I was up till 4am checking and fiddling, cant figure it. Thanks for any help. Quote Link to comment Share on other sites More sharing options...
Medibot3D Posted October 9, 2010 Share Posted October 9, 2010 Hi I installed this contrib yesterday and have struggled to get it working. Im sure it has to be a simple problem. Problem is im more simple when talking php. So in admin when i try to upload an image I get the following errors. Error Failed to create directory /data/www/vhosts/theresistancestore.com/httpdocs/backups/catalog/images/products/dvd-movies/. Error This: /data/www/vhosts/theresistancestore.com/httpdocs/backups/catalog/images/products/dvd-movies/ directory is not writable. Attempting to correct... Success Directory permissions on /data/www/vhosts/theresistancestore.com/httpdocs/backups/catalog/images/products/dvd-movies/ was set successfully. Error Failed to create directory /data/www/vhosts/theresistancestore.com/httpdocs/backups/catalog/images/products/dvd-movies/comedy/. Error Error returned from alterimage class: 1 Error Thumb file: /data/www/vhosts/theresistancestore.com/httpdocs/backups/catalog/images/products/dvd-movies/comedy/ab095cf9409347e558f9713a77286226s.jpg could not be created. Error Error returned from alterimage class: 1 Error Products Info file: /data/www/vhosts/theresistancestore.com/httpdocs/backups/catalog/images/products/dvd-movies/comedy/ab095cf9409347e558f9713a77286226m.jpg could not be created. Error Error returned from alterimage class: 1 Error Large file: /data/www/vhosts/theresistancestore.com/httpdocs/backups/catalog/images/products/dvd-movies/comedy/ab095cf9409347e558f9713a77286226l.jpg could not be created. When I go to my images directory /products. The permissions are greyd out I cant change them. The contrib will upload my first main image but i cant add extra images, although the above errors will apear on both. Also the created main image will be set to 777 and again greyd out so i cant change it. Any one know what ive done wrong. I was up till 4am checking and fiddling, cant figure it. Thanks for any help. Just a little update to the above. I just tried the install on a new store. and it does the same. If anyone can think what im doing wrong please help. I up loaded all files straight over the old ones, installed sql all green, and fiddled with the settings a lot. Im very confused?? :'( Quote Link to comment Share on other sites More sharing options...
lucilled Posted October 22, 2010 Share Posted October 22, 2010 Hello all, I've just installed this mod on a fresh install of a purchased template, and having what seems to be a minor issue. Everything seems to be working fine from the Admin Zone. Although, when I preview the store's frontpage, I get the following error for the application_top.php file: Fatal error: Call to a member function add_current_page() on a non-object in /.../.../.../.../.../catalog/includes/application_top.php on line 320 I haven't seen any topics about this on this forum thread just yet...What am I doing wrong? Any help is greatly appreciated. Thanks Quote Link to comment Share on other sites More sharing options...
web2dev Posted October 31, 2010 Share Posted October 31, 2010 Hello, I have a problem with the modified contribution Additional Images for STS content pages - Version 1. I see the tags $imageblock1$, $imageblock2$, $imageblock3$, $imageblock4$ instead of the images. I installed, as the setup txt file instructs the addons Additional Images version 2.1.0 and STS version 4.5.8 (and I used these older versions just because they were tested). I followed all instructions in all addons very carefully. Everything works fine except of course the imageblocks. Lightbox is working fine, I can add more than one image in products but I can see only the first image. I read in previous pages in this thread that someone had the same problem, but there wasn't any solution. Can someone please help me? Thanks in advance George Quote Link to comment Share on other sites More sharing options...
web2dev Posted November 5, 2010 Share Posted November 5, 2010 anyone? I thought this addon was better supported. :( Quote Link to comment Share on other sites More sharing options...
♥multimixer Posted November 5, 2010 Share Posted November 5, 2010 anyone? I thought this addon was better supported. :( Well, I'm sorry that the customer service is that slow :) I can not reproduce your situation, since everything works fine for me (also with STS 4.6), so maybe some more info from your side will help. 1) Did you add the code to file includes/modules/sts_inc/product_info.php? (I guess yes) 2) Do you use a atg (ie $imageblock1$) in a CONTENT template of product_info.php.html? 3) What do you see on the screen instead of the images? The tag name? 4) What tag do you use to get the first product image into the template 5) How are you admin settings for additional images? Quote My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
web2dev Posted November 5, 2010 Share Posted November 5, 2010 Well, I'm sorry that the customer service is that slow :) I can not reproduce your situation, since everything works fine for me (also with STS 4.6), so maybe some more info from your side will help. 1) Did you add the code to file includes/modules/sts_inc/product_info.php? (I guess yes) 2) Do you use a atg (ie $imageblock1$) in a CONTENT template of product_info.php.html? 3) What do you see on the screen instead of the images? The tag name? 4) What tag do you use to get the first product image into the template 5) How are you admin settings for additional images? Hi, thanks for the reply. 1. yes, I copied both changes from installation.txt and I just checked product_info.php from the addon folder and from the eshop folder and they are the same. 2. I used all tags $imageblock1$, $imageblock2$, $imageblock3$, $imageblock4$ to see how they appear and to test it and I used it on includes/sts_templates/full/content/product_info.php.html 3. I see the tags $imageblock1$, $imageblock2$, $imageblock3$ and $imageblock4$. Only these tags appear, the rest tags work fine ($additionalpopsmall$, $mainimagepop$, $additionalpopsmall$, $additionalpopmed$, $mainimagebig$, $mainimagemed$, $mainimagesmall$ <-- these work fine). 4. I guess you mean the $additionalpopsmall$ tag? This is the first I see. 5. Automatically create 3 image set true Background color Pre-fill upload dir w/ Category names true Pre-fill starting with this sub-dir products Use image size restrictions false Product Info: Show Additional Images true Product Info: Product Image Behavior popup Product Info: Group parent with sub-images false Product Info: Restrict parent image size true Product Info: Table alignment center Product Info: Table location below Product Info: Number of columns 3 Product Info: Number of rows 2 Popup: Show Thumbnail Menu true Thumb Menu: Show parent image true Thumb Menu: Use image size restrictions false Thumb Menu: Table alignment center Thumb Menu: Table location below Thumb Menu: Number of columns 3 Thumb Menu: Number of rows 2 Lightbox effect true These are the settings you want, right? In general I haven't changed anything in the original product_info.php.html from sts 4.6.1 except the addition of the Additional images tags. thanks again. george Quote Link to comment Share on other sites More sharing options...
♥multimixer Posted November 5, 2010 Share Posted November 5, 2010 (edited) 4. I guess you mean the $additionalpopsmall$ tag? This is the first I see. No, I mean, do you see the $tag$ name, like $imageblock1$ on th screen, or just nothing? Try to change following admin setting -> Product Info: Product Image behavior popup to be -> Product Info: Product Image behavior product_info and tell me what happens. Edited November 5, 2010 by multimixer Quote My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
web2dev Posted November 5, 2010 Share Posted November 5, 2010 (edited) No, I mean, do you see the $tag$ name, like $imageblock1$ on th screen, or just nothing? Try to change following admin setting -> Product Info: Product Image behavior popup to be -> Product Info: Product Image behavior product_info and tell me what happens. Hi again, just to clarify... You ask: 3) What do you see on the screen instead of the images? The tag name? I answer: 3. I see the tags $imageblock1$, $imageblock2$, $imageblock3$ and $imageblock4$. Only these tags appear, the rest tags work fine ($additionalpopsmall$, $mainimagepop$, $additionalpopsmall$, $additionalpopmed$, $mainimagebig$, $mainimagemed$, $mainimagesmall$ <-- these work fine). You ask: 4) What tag do you use to get the first product image into the template I answer: 4. I guess you mean the $additionalpopsmall$ tag? This is the first I see. So you probably mixed my answers for 3 and 4. :) AND YES...THANK YOU that did the trick...changed it to Product Info: Product Image behavior product_info and it now works fine thank you very much again!! george Edited November 5, 2010 by web2dev Quote Link to comment Share on other sites More sharing options...
♥multimixer Posted November 5, 2010 Share Posted November 5, 2010 So you probably mixed my answers for 3 and 4. :) that did the trick...changed it to Product Info: Product Image behavior product_info and it now works fine Yes, I see now that I mixed up in the hurry. Glad anyway that it works, I just checked and see that in includes/modules/sts_inc/product_info.php, over ie imageblock1 it is stated // displays the block of additional images in small size (with or without parent image, depending on admin settings in "Product Info: Group parent with sub-images" Admin need to be set to display on product info. On click = lightbox if enabled. If disabled use thumbs for mouseover $template_pinfo['imageblock1'] = $imagemenu->groupoutput(); Maybe it's not clear enough, if I have time one day I'll write better instructions and make some better tags Quote My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
web2dev Posted November 5, 2010 Share Posted November 5, 2010 Yes, I see now that I mixed up in the hurry. Glad anyway that it works, I just checked and see that in includes/modules/sts_inc/product_info.php, over ie imageblock1 it is stated Maybe it's not clear enough, if I have time one day I'll write better instructions and make some better tags Oo, really sorry then, since that's the case, because after so many times reading the files to see if anything was wrong when I copied the lines I never noticed that. But, since this whole mixed-addons addon is for additional images on sts with lightbox why don't you set default behavior for the Product Info: Product Image behavior to be product_info? Just saying as an idea, but please be lenient with me, since I'm not an advanced programmer in php and maybe my idea is not applicable. thanks again george Quote Link to comment Share on other sites More sharing options...
♥multimixer Posted November 5, 2010 Share Posted November 5, 2010 Oo, really sorry then, since that's the case, because after so many times reading the files to see if anything was wrong when I copied the lines I never noticed that. But, since this whole mixed-addons addon is for additional images on sts with lightbox why don't you set default behavior for the Product Info: Product Image behavior to be product_info? Everything is fine, I just thought maybe the "instruction line" was not there. Why I don't set a default behavior? Because I think each one should have the choice, also possible that you want to use this, having the additional images in the pop up.There are other scripts available where you can have the a whole galerry in a lightbox style pop up etc etc Quote My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
Guest Posted November 6, 2010 Share Posted November 6, 2010 Is there a gallery add on that works with this mod? Quote Link to comment Share on other sites More sharing options...
♥multimixer Posted November 6, 2010 Share Posted November 6, 2010 Is there a gallery add on that works with this mod? will be one day for sure :) Quote My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
web2dev Posted November 7, 2010 Share Posted November 7, 2010 Hi again :) Can someone please help me on something else as well? I'm still a novice in php. :( I want the product_reviews_info.php and the product_reviews.php to be able to show the image popup using lightbox. I don't want to create sts template for these two pages. How do I edit the following code (which is the same for both files) in order to view the big image when click to enlarge or the thumbnail is clicked? <script language="javascript"><!-- document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); //--></script> <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> </noscript> I have already added the js and css declarations in the head section. thanks in advance George Quote Link to comment Share on other sites More sharing options...
mran Posted December 5, 2010 Share Posted December 5, 2010 Hi, I wonder if someone can help me, please? I have two pages, one of which is displaying the images correctly, and the other which is, for some reason, resizing the large image to display at 60px: http://natrlobs.sc22.info/product_info.php?cPath=26&products_id=29 <--the good page http://natrlobs.sc22.info/product_info.php?cPath=23&products_id=32 <---the "bad" page On both pages, the "large" version of the image is being called, but on the good page, the javascript is rewriting the image to be 200px, and on the bad page, it's rewriting it as 60 px. Why??? 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.