Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product photo - duplicate


Fyod

Recommended Posts

Posted

I've searched around and can't find an answer to my idea.

What I need is each product to be able to have 2 pictures in the product listing, no more or less. The reason being that one will serve as the background, the second will be a regular picture like they are now. I currently have this set up via CSS. The problem is that the background picture has to be the same for every product using CSS, not product dependant.

I am doing this for a shirt store. Background pic will be a certain color shirt, and the regular (foreground) pic will be a transparent PNG with the design.

 

My idea is to do this:

 

in product_listing.php, change from

 

<td align="center" class="vam">'.$p_pic.'</td>

 

to something like

 

<td align="center" class="vam" style="background-image:url('.$p_pic_bkg.')">'.$p_pic.'</td>

 

I'm not sure if that can be done.

 

Then in admin - categories/products - product edit, the field which lets you choose a picture on your local drive would be duplicated.

 

Appropriate changes to the DB would be made, ie. new field for the $p_pic_bkg.

 

Not sure if any others need to be changed.

 

I have standard knowledge od PHP/MySQL so I can imagine how this could be done, but I can't execute that idea.

 

Can anyone help me out?

Archived

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

×
×
  • Create New...