Author Topic: --> in reaction > New Product Image Overlay  (Read 2491 times)

ByGijS

  • Beginner
  • *
  • Posts: 8
--> in reaction > New Product Image Overlay
« on: September 14, 2006, 04:39:29 am »
Ok...

Second Post - hehe...

Is this possible, not 2 give it a "delete after xx day's" but let's say:
i activate the "On Special:" option...
Then the same happends...
A image appears over...
Think of a house that is sold, and u want 2 ad a "sold" image over it, by clicking just "On Special:"...

Tnx

test URL: http://www.bygijs.com/joomla/index.php?page=shop.browse&category_id=15&option=com_virtuemart&Itemid=48
When i look outside the window, i see a yellow chrysantium
Even when there is nothing, i see a yellow chrysantium...

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Re: --> in reaction > New Product Image Overlay
« Reply #1 on: September 14, 2006, 05:21:47 am »
In shop.product_details.php before

/**
*   Read the template file into a String variable.
*   Then replace the placeholders with HTML formatted product details
*
* function read_file( $file, $defaultfile='') ***/

add this

if ($db_product->f("product_special") == "Y") {
   
    $product_special = "<img src='".IMAGEURL."ps_image/prod_special.png'>"; }
else {
    $product_special = "";
}

You'll have to create the image you want in ps_image and call it like the above or rename the above

at the end of the list that looks like this add this

$template = str_replace( "{product_special}", $product_special, $template );

you'll then have to add a tag in your flypage of {product_special} where you want the image to be placed.

Obviously enclose it in a div and assign a class then you can do the positioning with css

Mark
Mark
All of My old mods are now available on my website.
Mark Callf Designs

If you like the work I've done for VM please fell free to Donate

Please Note: I am no longer actively developing or involved with VM development.

k0nan

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 69
Re: --> in reaction > New Product Image Overlay
« Reply #2 on: May 22, 2007, 16:43:02 pm »
very very very useful please sticky this!

also, there is a way to add it in shop.browse.php ?

i tried editing the code to make it similar for working on browse page but this do not work

thanks in advance
The Official VirtueMart 1.1 User Manual  is out, get a copy now!

Stai cercando aiuto per VirtueMart in Italiano ? Visita VM Italia