Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Custom Multiple Images Hack p.products_image


zathrus

Recommended Posts

Posted

The other multiple image modules were more than I needed in most cases, and didn't work exactly as I would need them to. (also there was a distinct lack of commenting about which lines could be changed if you weren't willing to overwrite your files and lose your other mods)

 

So I decided to write my first hack. When it's done (it might be a bit rough) I'll let it loose of course.

 

I simply need a thumbnail image which will normally be displayed (images were appearing too squished no matter how we adjusted image size in admin) and a large image displayed in the pop-up.

 

(and yes I've looked at mo pics, bigimages, sm med lg images, and a few others, and dynamic mo pics)

 

I've already done some editing in the admin files

 

just adjustments to add an extra field to the form

altered the sql table to have a field called products_large_image right after products_image

looked through the file and inserted this new field into sql statements where necessary (it is possible I missed one)

most of these adjustments were in admin/categories.php

 

did this mod in the new_product action and new_product_preview

now, first problem (main question in writing this, answer I'm looking for)

 

creating a new product or editing an existing one still works fine, but the large image name does not get placed in the table

 

I'm wondering (possible if it's because of the statements with things like p.products_image, p.products_large_image

 

What is p? And where is it defined? Is this my missing link? As well as some other p something info variable I can't recall at the moment.

(I may be more precise later after another look at what I've changed, yes I'm commenting all my changes and making a listing of them )

 

Now, just to see if it was just the insert into command that was screwing up (which is not the case) I added a large image into one of the products manually into the database

 

and I borrowed the same idea from sm med lg pics for popup_image.php

where

it checks if the large image exists, if it does, it prints it, if it doesn't, it prints the smaller one

 

I changed it accordingly to match my variable names, and the popup_image.php always come up blank

ALWAYS

 

Again, the same p.products_large_image comes into question

anyone know where the p.whatever variables are defined?

 

Any other advice? Anything simple you would like to see? (just don't expect anything right away)

 

Thanks in advance, this is a great discussion board.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...