Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2005
    Location
    New Zealand
    Posts
    92
    Plugin Contributions
    0

    Default Where is the product image location stored?

    I'm in the process of upgrading to the latest version and have noticed that I have images all over the place and would like to tidy them up into a subfolder by supplier.

    In the Products in Category 'xxxxx' view, in section : Product Image and field : Upload to directory <Main Directory> the user can select the image location.

    My preference is to use a SQL update statement to update the relevant field in order to standardise the image location, however I can't identify the relevant table/field combination.

    Can anyone identify it for me?


    Thanks

    Paul
    Paul
    ######################################################################
    http://kiwisouvenirs.com/

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Where is the product image location stored?

    See the products_image field in the products table.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Sep 2005
    Location
    New Zealand
    Posts
    92
    Plugin Contributions
    0

    Default Re: Where is the product image location stored?

    The products_image field in the products table contains the file name of the image.

    I am looking for the data field containg the folder name

    i.e.

    ../<storename>/images/large/<supplier name>
    ../<storename>/images/medium<supplier name>
    ../<storename>/images/<supplier name>

    Cheers
    Paul
    ######################################################################
    http://kiwisouvenirs.com/

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Where is the product image location stored?

    The ../<storename>/images/ path is considered the root path for your images. You should NOT change that. (It comes from DIR_WS_IMAGES define).
    The '/large/' and '/medium/' parts are hard-coded values.
    And, the products_image value is simply appended to those paths.

    So, if you just pre-pend your "supplier_name" folder onto the beginning of the products_image value, and then create all the corresponding supplier_name folders under /images/ and /images/medium/ and /images/large/ then it'll all work just fine.

    Example:
    - you have 2 products, one supplied by Canon, with products_image set to abc_product.jpg .... and the other from Kodak, with products_image as def_product.jpg
    - you would change the products_image field from 'abc_product.jpg' to 'canon/abc_product.jpg' .... and from 'def_product.jpg' to 'kodak/def_product.jpg'.
    - then you would arrange your images into the corresponding folders, like this:
    /images/canon/abc_product.jpg
    /images/kodak/def_product.jpg
    /images/medium/canon/abc_product_MED.jpg
    /images/medium/kodak/def_product_MED.jpg
    /images/large/canon/abc_product_LRG.jpg
    /images/large/kodak/def_product_LRG.jpg


    ref: https://www.zen-cart.com/tutorials/index.php?article=58
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Where is the category/product stored?
    By mdivk in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 7 Nov 2018, 10:38 AM
  2. v139h Where are Image Handler images stored?
    By kevinmc3 in forum All Other Contributions/Addons
    Replies: 10
    Last Post: 26 Jun 2012, 12:14 PM
  3. Where is product information stored?
    By 5tar5hine in forum General Questions
    Replies: 4
    Last Post: 11 Nov 2009, 10:29 PM
  4. Where? Do product image files get stored? My multiple size images aren't working
    By PetesTown in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 26 Jul 2007, 11:25 PM
  5. Where is the product info etc actually stored!
    By Gooseman in forum General Questions
    Replies: 2
    Last Post: 24 Jul 2006, 11:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg