Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

AlanR

Pioneers
  • Posts

    3,667
  • Joined

  • Last visited

Everything posted by AlanR

  1. I knew I wasn't seeing much, certainly not as much as I would expect if something like the SEO contribution was installed. It was mostly either commented out or a class which may or may not be used.
  2. OK, I'll work my way through it and see if I run into any puzzling issues. I've been doing file compares to merge the changes into the most recent version and I've come across a few mod code snippets I'll need to figure out. I haven't used some of the contributions you list, I need a really basic store right now. The way I'm doing it is kind of tedious and time consuming although BBEdit is great for this type of thing. I've learned that doing it the hard way pays off at the end because I have a much better idea of what's where and what's going on if I eyeball the code even though I don't fully grok it yet. I might create a vanilla version by stripping out the contributions later on. I should have versioned it before I started but skipped that. I'll version it next.
  3. You probably should upload your admin section as well since you have contributions built into the catalog code. I've not finished with the catalog section yet, I'm about 60% done but I had to stop to take care of other things. I'll finish that in the morning and see what impact the contributions have and what else I need to do.
  4. I don't think that's such a good idea. It's been at least a couple years since I spent much time with osC but now I need it. I remember that a big issue was uncontrolled access to contribution maintenance. It gets really confusing if anyone and everyone can add things. I don't mind if you make me a secondary mainainer (or not) but I wouldn't leave it wide open, too many problems crop up. That's why the newer system allows controlled access. I'll send my changes to you if need be.
  5. The centering trick I mentioned was for centering the entire store by placing it in a div. Using the stricter doctype breaks the entire basic store layout. Quirks mode has to be used for a regular osC install. With your work we're already one step ahead. I'm not quite finished with what I'm doing, I'm merging your changes into the very latest version (as of today) from github so as to get all the latest security and other changes. Once I'm happy with that I'll further tweak it and hopefully find a CSS solution for the infoboxes. I don't think it will be too difficult. I'm actually glad your demo store versions show the glitch in Windows Opera so that Windows users can see it and help find a solution. I think there should be a version 2.5 modeled after what you've done.
  6. OK, I have a little update. I installed Opera on the XP box and it shows the same flaw. This shouldn't be too hard to track down since it works well in most major browsers. Once I get it set up I'll see what I can find in the CSS for the boxes which could cause this.
  7. Sorry for the multiple posts but I'm really pleased to have found this and it's really worth following up on. I just checked your sites on a Windows box in Firefox and it looks fine, no glitches. It's the only Windows machine I have available right now and it's an old XP box with IE 6 so I didn't bother looking with IE on that machine. I can try a different machine later on.
  8. What doctype declaration are you using in the demo's files? In the git source Harald switched from <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> to <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> and it broke the CSS centering trick that many people use. This is a shot in the dark but if you use proper CSS we may be able to use the correct (more strict, lower declaration) The upper declaration forces Firefox to use quirks mode for rendering. Doh! All I needed to do was look at the source. You're using the more strict doctype. No joy there.
  9. Camino and Opera show the same issue. Camino is actually a little worse.
  10. This is terrific! I had thought about doing this but the time involved made me pause. I haven't installed it yet but the demo sites look good. There's one issue I see in Firefox but not in Safari. Firefox displays a small glitch at the bottom of the info boxes (image below). The same boxes display perfectly in Safari. Any ideas before I start with the mod?
  11. Burt's answer earlier in this thread is kind of what I was looking for but maybe others have something to add. I have a need to set up a new store and I don't have any active ones right now (ones that are actually selling anything). I've decided to start fresh and for the first time I've thought about using a templating system so I've been doing some searches to see if there is any real reason I should. I'm not worried about messing around with code, I've been doing that long enough but I did a few mods for phpBB and came to really like their system which is completely template based. But... reality intrudes, I don't want to use version 3 for an live store and I can easily live with the structure of V2, I understand it quite well even if I'm not really that fond of mixing php and HTML any longer. So the question is, should I bother with a templating system and spend time fooling around with that or just stick with what I know?
  12. Yes, that's what I use it under mostly.
  13. That's much more reasonable than a drop down menu. A drop down menu would be best implemented using values stored in the database and I purposely avoided any database changes because it makes the contribution needlessly complex and harder to install. It also would be non trival since each entry would have to be tested to make sure that it didn't already exist. Who knows how many or what names people will dream up? You can use the category names but replace spaces with underscores. You should never put spaces in directory names or file names. It's as simple as something like this: $image_subdirectory = str_replace(" ","_",$category_name); // replace space with _ If you check a few posts up there's a simple change so that the value of $image_subdirectory is remembered for the duration of the session. That makes the job much easier.
  14. Sorry, if someone "sold" you a "loaded" version it's my opinion that it's their responsibility to make sure that all the things they "loaded" work. I don't have time to help them fix their problems.
  15. doh! I did forget to mention that you can change the directory permissions on the fly by uncommenting a line in categories.php. This is covered in the contributions documentation. At around line 378 you'll find: // chmod($dir, 0777); // Change to suit server needs, depending on directory owner If you uncomment that line your new directories will have full rwx permissions for "world" and you'll be able to delete them or whatever. It's not such a great idea though since it means that anyone from outside can do the same. There have been instances of hackers planting scripts into image directories set to 777 so since your setup works for normal use without 777 I'd recommend against it.
  16. This can't be changed from within the script. It's beyond the scope of what I intend to do with the contribution. This happens because on your server php is running as user apache and directories it creates are owned by apache. You, when you run an ftp client, are running as a different user. You may want to turn the directory creation feature off and create the directories with your ftp client. They'll be easier for you to manage that way and it's not a major burden to think ahead a little and plan out the directory structure. You should be able to delete the directories or files it creates by using osC's File Manager (Admin -> Tools -> Files). Since osC is php it's running as user apache as well. I'm PMing you a link to a php based file mananger which will handle this nicely.
  17. Ah, I didn't really understand your suggestion at first. I don't think it's such a good idea because we can't know how people would like to organize their images. You may think that a category directory is fine but someone else might like to organize their images by date, color, style or whatever. People who want other methods might well be annoyed about having to undo a preset choice. I hope that the change I offer does help. You only need to enter the subdirectory once per session if you want and from that point on all you need to do is add the image. I've got a couple of other things I'm planning to add, one technical and another to let people easily select an image that already exists on the server. This may be useful for people who want to use the same image for multiple products.
  18. Yes, this is a simple change. Add, in categories.php, at the top, just below... require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); // Remember last used subdirectory for session if (!tep_session_is_registered('image_subdirectory')) tep_session_register('image_subdirectory'); if (isset($HTTP_POST_VARS['image_subdirectory'])) { $image_subdirectory = tep_db_prepare_input($HTTP_POST_VARS['image_subdirectory']); } // end of remember subdirectory Then the page will remember the directory last used for the duration of the session.
  19. I'm not sure what you're asking for from a user perspective. Using the new products screen is inherently a "one at a time" operation. I'm guessing that you want to bulk upload images then enter the image name and the subdirectory for each product, and have that saved as the image name in the db. This can be done but I don't know that many people would want it. To be safe it would require an extra input field for the server saved image name since some browsers don't even present an input field for the browse function as osC is set up, only a single browse button.
  20. I had a question about using a default value in the subdirectory field, in this case "products/" It's a simple change. Up at the top of categories.php in the configuration section just predefine the value of $image_subdirectory like so: // ---------- Configure Image Path Tool Features Below ---------- // define('USE_REG_GLOBALS_PATCH', 'false'); // Use the register globals fix define('USE_PHP5_MKDIR', 'false'); // Use the php5 mkdir function, set to false if you need to use chmod after creating directories define('SHOW_DIR_CHECKBOX', 'true'); // Allow users to create new directories define('USE_UNIX_SLASHES', 'true'); // Use / slashes for php4 mkdir. Set to false for Windows $image_subdirectory = 'products/'; // set default subdirectory // ----------------------- End Configure ----------------------- // Then that subdirectory will appear by default in the field and you can choose to use it, backspace through it or add to it.
  21. Sorry but it's not going to happen. It's a non trivial user issue. How can the user know from the product screen what other images are in any directories that would be removed? I won't set it up so that when a user removes one image an entire directory or directory chain is removed.
  22. I thought about this but decided it was not very useful. Most people creating subdirectories are using them because they have many images and need to organize them so as not to end up with hundreds or thousands of images in the /images folder. It's unlikely that they'll be deleting folders very often and when it is needed I think that it's best done via ftp or ssh where the user has complete control and understanding of what they are deleting.
  23. Without installing and combining the 3 Images contribution with this one there's not a lot I can do to help you. Check for mistakes you may have made, if you can't find any it's time to get your feet a little wet with php. This is the simplest part of my contibution, all I'm doing is capturing a string that you place into the subdirectory field ( $image_subdirectory ) and then concatenating (adding) it onto the front of the filename... $products_largeimage_name = ($image_subdirectory . $products_largeimage) and at the end of the target image directory... set_destination(DIR_FS_CATALOG_IMAGES . $image_subdirectory) Revert one or the other (medium or large) types back to the original code and tinker around with the other one till you get the correct result. It'll be easier than you think and you'll learn something new.
  24. It's a pretty simple change From the 3 Images contribution I snagged this: // Big Image Start $products_mediumimage = new upload('products_mediumimage'); $products_mediumimage->set_destination(DIR_FS_CATALOG_IMAGES); if ($products_mediumimage->parse() && $products_mediumimage->save()) { $products_mediumimage_name = $products_mediumimage->filename; } else { $products_mediumimage_name = (isset($HTTP_POST_VARS['products_previous_mediumimage']) ? $HTTP_POST_VARS['products_previous_mediumimage'] : ''); } $products_largeimage = new upload('products_largeimage'); $products_largeimage->set_destination(DIR_FS_CATALOG_IMAGES); if ($products_largeimage->parse() && $products_largeimage->save()) { $products_largeimage_name = $products_largeimage->filename; } else { $products_largeimage_name = (isset($HTTP_POST_VARS['products_previous_largeimage']) ? $HTTP_POST_VARS['products_previous_largeimage'] : ''); } // Big Image End And tweaked it to append the subdirectory to the destination folder and prepend the subdirectory to the image name like so... // Big Image Start $products_mediumimage = new upload('products_mediumimage'); $products_mediumimage->set_destination(DIR_FS_CATALOG_IMAGES . $image_subdirectory); if ($products_mediumimage->parse() && $products_mediumimage->save()) { $products_mediumimage_name = ($image_subdirectory . $products_mediumimage)->filename; } else { $products_mediumimage_name = (isset($HTTP_POST_VARS['products_previous_mediumimage']) ? $HTTP_POST_VARS['products_previous_mediumimage'] : ''); } $products_largeimage = new upload('products_largeimage'); $products_largeimage->set_destination(DIR_FS_CATALOG_IMAGES . $image_subdirectory); if ($products_largeimage->parse() && $products_largeimage->save()) { $products_largeimage_name = ($image_subdirectory . $products_largeimage)->filename; } else { $products_largeimage_name = (isset($HTTP_POST_VARS['products_previous_largeimage']) ? $HTTP_POST_VARS['products_previous_largeimage'] : ''); } // Big Image End I haven't tested this but it's pretty easy to see and understand what I've done so you can play with it if you need to.
  25. Now we can try to figure out why the checkbox does not appear. Add these lines before (or after) at about line 330 // Here we strip away any extra slashes print 'new_dir: ' . $new_dir; print '<br>image_subdirectory: ' . $image_subdirectory; print '<br>USE_REG_GLOBALS_PATCH : ' . USE_REG_GLOBALS_PATCH; print '<br>USE_PHP5_MKDIR : ' . USE_PHP5_MKDIR; print '<br>SHOW_DIR_CHECKBOX : ' . SHOW_DIR_CHECKBOX; print '<br>USE_UNIX_SLASHES : ' . USE_UNIX_SLASHES; Then, after you click preview you'll see the result from these lines at the top of the screen, like so... new_dir: on image_subdirectory: mydir1/mydir2 USE_REG_GLOBALS_PATCH : false USE_PHP5_MKDIR : false SHOW_DIR_CHECKBOX : true USE_UNIX_SLASHES : true You can also override the configuration setting for the checkbox by defeating the test. At about line 650 you'll find a line starting with if (SHOW_DIR_CHECKBOX == 'true') Just change that to if ('true' == 'true') and you defeat the configuration value, good for a test. Let me know what you find.
×
×
  • Create New...