Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.


  • Content count

  • Joined

  • Last visited

  1. asmoday

    uses of spaces instead of tabs

    I didn't ask for a change nor saying that osCommerce have to fit my personal tastes and/or needs. >_< If it's a personal matter then so be it. I would appreciate any changes to this, but if there are none I will just do it myself. When I make a customized layout I have to go through the code anyway and then Ill just take the indenting along with it. Besides there are other objective reasons not to use spaces. Alot of editors are designed around the tabbed indents, with some editors you can specify how long a tab should look like. When you don't like deep indents you just change the preferences of your editor to make it look like 2 spaces. This way everyone can view the code in a way they like it. But since osCommerce doesn't use the tab character in it's code but the space character instead to indent; changing preferences on indent width (visually) doesn't work at all. Another reason to do so is because it cuts down on filesize to a certain extend.
  2. I've been working with osCommerce and customising it for a while now. I tried to find a topic on this matter but I didn't find one so here goes: I was wondering why there are only 2 spaces used for indenting instead of using tabs to indent? I personally find it much harder to read and more important to work on the code with than the use of tabs. Why is osCommerce is one of the very few projects handling this code markup?
  3. First of all I want to say that this is a very nice addons, however...... there is something in this addon that's very disturbing to me, although it already was like this in the 'vanilla' version of oscommerce. When you upload images it puts them in a general folder this is fine however the images names aren't renamed with a prefix of the product id whatsoever to make them unique to a certain product. For example when I upload an image with the same filename but in different products, it starts to get very messy. The imagenames aren't bound to the product, even though they can be tracked in the products table. I already tried to do some quick fix for this (making the image column names unique), however i'm afraid the users that will deal with my shop will not understand mysql errors and will have a very hard time to track filenames themselves. When I have more time I will code a seperate dialog/form apart from the product submission to upload images. This way the product_id is always available and uploads of images don't get lost when some required fields of the product submission failed. This way you can use the product_id to prefix the images or make a new folder with the product_id and put the images in there. I would also suggest to make a seperate table for the product images and remove the added columns to the products table. Then you'll just join the product tables and the product_image table by it's product_id. It keeps the products table more clean and you can upload as much images as you like to any product. This way you can also give the individual image the same id as they have in the imagetable. Combining with the above product_id named folders; every image will be unique and then it will be possible to upload images with the same names to different products without any worries. This also gives the possibility to upload the same image to both the small, medium, large field and automatically resize them to the apropiate image sizes set in the Images settings. It will make the whole user experience alot easier, especially for those with little know-how about web applications and boosting the site speed as well with apropiate sized images.