Zen Cart Logo
Forums / General Questions / I've created an additional image addon, and would like to contribute it.

I've created an additional image addon, and would like to contribute it.

Views: 757

Results 1 to 2 of 2
11 Jan 2016, 3:12 AM
#1
yaseent avatar

yaseent

Zen Follower

Join Date:
Mar 2009
Posts:
169
Plugin Contributions:
1

I've created an additional image addon, and would like to contribute it.

Hi peeps,

I've coded some work that allows you to:

  1. Trim (remove unwanted borders) and resize an uploaded base image, and also put it into large/ medium/ thumbs/ folders.

  2. Allows you to add addtitional images when inserting or updating a product, using the <input files[] multiple ="" /> html5 function.

  3. Also trims, resizes and automatically renames the additional images to the base image + a numbered suffix.

  4. If you don't have large/ or /medium folder within the directory you're uploading images to, it will create for you automatically.

  5. Does all the CHMOD permissions for you.

The multiple input file function allows to select multiple images at the same time from your PC instead of one by one selections. For the time being, this only works in newer versions of Safari and Firefox.

If anyone wants the code to turn into a module, please shout out.

NB: This code needs imagick enabled on your host. It probably is, and if it isn't it's probably not too hard to enable yourself, or by asking your host.

NB: the thumbs/ folder is an invention of mine to facilitate additional images on a product info display page. I did this so that the base image isn't too small. To be able to use the /thumbs, you're going to have to code this into your additional_images. This is not a requirement, you'll just end up having a thumbs folder with images inside that are not being used.

12 Jan 2016, 1:56 AM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: I've created an additional image addon, and would like to contribute it.

yaseent:

Hi peeps,

I've coded some work that allows you to:

  1. Trim (remove unwanted borders) and resize an uploaded base image, and also put it into large/ medium/ thumbs/ folders.

  2. Allows you to add addtitional images when inserting or updating a product, using the <input files[] multiple ="" /> html5 function.

  3. Also trims, resizes and automatically renames the additional images to the base image + a numbered suffix.

  4. If you don't have large/ or /medium folder within the directory you're uploading images to, it will create for you automatically.

  5. Does all the CHMOD permissions for you.

The multiple input file function allows to select multiple images at the same time from your PC instead of one by one selections. For the time being, this only works in newer versions of Safari and Firefox.

If anyone wants the code to turn into a module, please shout out.

NB: This code needs imagick enabled on your host. It probably is, and if it isn't it's probably not too hard to enable yourself, or by asking your host.

NB: the thumbs/ folder is an invention of mine to facilitate additional images on a product info display page. I did this so that the base image isn't too small. To be able to use the /thumbs, you're going to have to code this into your additional_images. This is not a requirement, you'll just end up having a thumbs folder with images inside that are not being used.

So there's a submission process you could go through to make the plugin available to a wider range of people. See: https://www.zen-cart.com/content.php?42-plugin-contribution-guidelines

Also, perhaps some of this could be incorporated into the likes of IH4 to improve on some of the same functionality...

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...