Feature request: change thumbnail location

Phoca Cart - complex e-commerce extension
lpatrick
Phoca Enthusiast
Phoca Enthusiast
Posts: 94
Joined: 13 Feb 2024, 17:00

Feature request: change thumbnail location

Post by lpatrick »

I'm trying to set up Phoca Cart to create a shop to sell Photographs. (Version 5 beta 25)

I like many features Phoca Cart offers for that.

I did see this was already requested here: viewtopic.php?t=17387&sid=293ad85aa9928 ... 736f9b89e8

But when I upload an image and have it watermarked with watermark-large.png and watermark-medium.png, then the original image without watermark can simply be retrieved by removing thumbs/phoca_thumb_l/m_ from the URL which sort of defeats its purpose, I'd say. In my case btw the overlay is such to entice them to buy the original image (i.e. BIG).

Wouldn't it be possible, please, to use the folder of the Category image for all thumbs of its Products instead?
Security requirement would then be to upload the Category image in one folder and all Product images in a 'secret' (sub)folder. And of course in this case a Category image would be required.

To keep existing installations accessible, I think this could be made selectable with a switch in the Phoca Cart Configuration.

I will see if I can hack into the code myself but I risk losing my edits with every new release, I suppose.

Thank you for considering.
mino182
Phoca Professional
Phoca Professional
Posts: 189
Joined: 12 Feb 2015, 13:30

Re: Feature request: change thumbnail location

Post by mino182 »

You shouldn't show images without watermark (overlay isn't an obstacle). It's about 2 clicks to download them from any public folder. There is download tab for digital products...
lpatrick
Phoca Enthusiast
Phoca Enthusiast
Posts: 94
Joined: 13 Feb 2024, 17:00

Re: Feature request: change thumbnail location

Post by lpatrick »

Thank you for your answer.
I also see my proposal was flawed because Products can be in several categories.

I see your point, using the Download tab.
But that Download isn't in the Export and I therefore assume it's not in the import (haven't checked the code).

Hmm but I see now that I can use the Download fields (*) of the Attributes. They are in the Export, let me see if they're in the import also.

And then perhaps pre-watermark the Product images before uploading because I cannot see the watermark overlay being used in a safe way if you can just access the un-watermarked.

(*) Btw there seems to be a small issue there: the Download Folder field is read-only in Product Attributes. When you select the image in the phocacartdownload subfolder, both folder and image name go into Download File field and when saving, there's an error that the Download Folder is empty. However, the update is accepted. Not sure how the download will work after accepted payment though. I didn't get so far yet.

This is the export of the attribute:

Code: Select all

					<option>
						<id>79</id>
						<title>Medium 1500 pix</title>
						<alias>medium</alias>
						<amount>0.0000</amount>
						<operator>+</operator>
						<stock>0</stock>
						<operator_weight>+</operator_weight>
						<weight>0.0000</weight>
						<image></image>
						<image_medium></image_medium>
						<image_small></image_small>
						<download_folder></download_folder>
						<download_token></download_token>
						<download_file>6e58ba429f022d77/image213.jpg</download_file>
						<color></color>
						<default_value></default_value>
					</option>
When I do it via XML, should I better split folder and file?

Code: Select all

					<option>
						<id>79</id>
						<title>Medium 1500 pix</title>
						<alias>medium</alias>
						<amount>0.0000</amount>
						<operator>+</operator>
						<stock>0</stock>
						<operator_weight>+</operator_weight>
						<weight>0.0000</weight>
						<image></image>
						<image_medium></image_medium>
						<image_small></image_small>
						<download_folder>6e58ba429f022d77</download_folder>
						<download_token></download_token>
						<download_file>image213.jpg</download_file>
						<color></color>
						<default_value></default_value>
					</option>
Or do it like in the downloads tab:

Code: Select all

					<option>
						<id>79</id>
						<title>Medium 1500 pix</title>
						<alias>medium</alias>
						<amount>0.0000</amount>
						<operator>+</operator>
						<stock>0</stock>
						<operator_weight>+</operator_weight>
						<weight>0.0000</weight>
						<image></image>
						<image_medium></image_medium>
						<image_small></image_small>
						<download_folder>6e58ba429f022d77</download_folder>
						<download_token></download_token>
						<download_file>6e58ba429f022d77/image213.jpg</download_file>
						<color></color>
						<default_value></default_value>
					</option>
Obviously I'll also want to generate and include download tokens.

Thanks for any more suggestions.
mino182
Phoca Professional
Phoca Professional
Posts: 189
Joined: 12 Feb 2015, 13:30

Re: Feature request: change thumbnail location

Post by mino182 »

Maybe it's little bit overthinked... Just create preview images with watermarks (using some batch image editor) and full images for download.

When you creating product large and medium images are generated automatically. Download folders are also generated, when you upload files. For first try to create working product in classic way, then experiment with import/export...
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Feature request: change thumbnail location

Post by Jan »

Hi,
the idea is simple:
- for displaying images, use e.g. watermarked images or loq quality images
- for downloading them after purchase, use standard download function where the folders are protected by token.

BTW, there is even parameter: image path, which can be changed:

Image

Jan
If you find Phoca extensions useful, please support the project
lpatrick
Phoca Enthusiast
Phoca Enthusiast
Posts: 94
Joined: 13 Feb 2024, 17:00

Re: Feature request: change thumbnail location

Post by lpatrick »

Thanks for your efforts - This can be closed if you wish.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Feature request: change thumbnail location

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply