Monday, February 19, 2018

Who's Online


The best solutions are simple, but finding these simple things is not simple.


If you have a large number of products,  you are going to have serious problems with VirtueMart unless you hack certain files, which we have done here for you.  (You can get them from our Downloads section.)

These problems stem from the requirement to have no more than 2,000 images in any one directory, and the desirability of keeping product images from different manufactures separate throughout their respective bulk uploading processes. 

If you have a hardware store, or a flooring showroom, or any other business with many thousands of products, you will reach a moment where you add one more full-size image to /shop_image/product and then sudddenly /shop_image/product/resized disappears! 

You will have the following weird symptoms: 

  • When you look for the /resized/ directory within the /shop_image/product/directory, you find it is no longer there!  /resized/ is gone when you look for it with FileZilla or Dreamweaver (and presumably this is so for other FTP clients as well).
  • But /resized/ really *is* there, as you discover if you try to have your FTP client create it.
  • The Product Images tab in VM says that the /resized/ directory is there and is writable.
  • cPanel's FileManager (on the server) shows that /resized/ and its contents do indeed exist, and that their permissions are set correctly.  But FileManager's behavior seems sluggish or erratic.

What's going on is that the server is set up with a limit on the number of files that can be listed via FTP.  Don't worry; /resized/ still there; but can't be found via FTP.  But the unavailability might wreak havoc on bulk uploads!

Ask your hosting company how many files you can have in any one folder and still see them all in an FTP directory. The usual answer is 2,000.  Stay within the limit, and remember that their limit includes counting invisible files (dot-files like htaccess , etc.), so don't go close to  the limit either.

For a large catalog, you have to divide the product images into nested sub-directories (perhaps by categories and manufacturers, etc.) to keep the number of images small in each.  


This is good practice anyway.  If you have 26 different manufacturers or suppliers, all sending you their huge product catalogs via CSV or EDI X12, accompanied by thousands of images, some of their images could theoretically have identical filenames.  So even if you have fewer than 2,000 products, you still can't bulk upload their collections into the same directory anyway. 

You want to be able to automagically keep your store's catalog current via bulk uploading all the manufacturers, so you will need to keep separate the images coming from different sources.  My recommendation is to use the following directory structure:  /shop_image/product/manufacturer/category  and/shop_image/product/manufacturer/category/resized

Unfortunately, VirtueMart has bugs that mess you up if you try this.  Even if you use CSVI (which I highly recommend) and it correctly creates all the thumbnails, and puts them in the right place, and stuffs the correct image paths into the VM product database table, VirtueMart still won't work right.  

One set of bugs is in /com_virtuemart/classes/ps_product.php.  These prevent the product images from displaying in the store's front-end component and on the back-end's Product Images tab whenever the image files are in sub-directories of shop_image/product.  (But the images can still be viewed in the links on the Product's Media List!)

Another bug is in com_virtuemart/show_image_in_imgtag.php. This bug makes the product images not display in the standard modules (although many third party modules work fine). 

I believe I have fixed these bugs.  In any case my VM site now works.  For do-it-yourself-ers, the details of the patches can be found here:

In addition to fixing the bugs, I enhanced the back-end's Product Images tab.  Instead of the Product Images tab testing the write-ability of only /product/ and /product/resized/, it will check the subdirectories as well. It also now reports the path of the assigned image rather than only showing the image.  Anyone who organizes images in sub-directoriesmay want to download this patched file too, and it won't hurt anybody else. It is product.product_form.php.


Electronic Mother's favorite pizza topping:

Joomla! Internet Domains for Sale

Are you a Joomla! template designer, website administrator, content provider, extension developer, user group coordinator, hosting provider, or consultant? 
The following Internet domains can give you a professional address for your webstes and e-mailboxes.  They are all available for sale from Electronic Mother:    $399.    $399.  $595.    $399.    $399.   
Sold only as a set:  $1,449.    $399.  $449.    $499.    $549.  $349.    $299.    $95    $195.     $399.     $399.
Sold as a set:  $599.
Sold only as a set:  $1,999.
Available only as a set. 
To purchase any of the above, pay via PayPal to This email address is being protected from spambots. You need JavaScript enabled to view it.;">This email address is being protected from spambots. You need JavaScript enabled to view it..  We will unlock the domain and send you the transfer authorization code.  If you haven't had a domain of your own before, we can guide you through the transfer process. 
If you would like help with developing your website, we can help with that too.  For more information, email This email address is being protected from spambots. You need JavaScript enabled to view it..