Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,279
    Plugin Contributions
    0

    help question overlay soldout image help needed

    hello.
    I need to add a overlay sold out ribbon on top of listings images.
    I can not find a code or any specific section to modify for this reason

    Any info would be greatly appreciated.

    Thanks.

  2. #2
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,279
    Plugin Contributions
    0

    Default Re: overlay soldout image help needed

    ok got it figured out ..

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: overlay soldout image help needed

    What was the secret that worked for you?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,279
    Plugin Contributions
    0

    Default Re: overlay soldout image help needed

    part of the secret will work for everyone , the other part is site design specific and need CSS work.

    need to modify , functions_general.php . around line 1141 or 1142
    i added two div to following function .

    $return_button =zen_image_button(BUTTON_IMAGE_SOLD_OUT_SMALL, BUTTON_SOLD_OUT_SMALL_ALT)

    after , using CSS positioned sold out ribbon over product image.
    so far so good. is working , this might not be the good way to go as i can not override functions_general.php .

    but after looking at all files , this was the only way for me to go .

  5. #5
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: overlay soldout image help needed

    why not just wrap the product listing image with a div

    $lc_text = '<div id="listingPImage">' . '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>' . '</div>';

    then right below id add an if statement so it knows to place the sold out overlay image over product image if the products quantity is 0 like this:

    if ($listing->fields['products_quantity'] == 0) {
    $lc_text .= zen_image(DIR_WS_IMAGES . 'button_sold_out_sm.gif', 'Sold Out', '51','18', 'class="soldOutOverlay"');
    }


    using the default sold out image as an example - simply replace with your overlay image and upload to YOUR_TEMPLATES button file

    then add this to your stylesheet

    .listingPImage {
    position:absolute;
    }

    .soldOutOverlay {
    position:relative;
    top:-80px;
    }


    again top:-80px moves the overlay image over the product image (set the -XXpx to the height of product image) or change as needed

  6. #6
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,279
    Plugin Contributions
    0

    Default Re: overlay soldout image help needed

    Thanks

    Your solution will work, however, after applying your solution , i ended up with lots of layout issue so i had to revert back to my original solution .

    however, i will keep working with your solution when i have time , but right now , i think what i got is working properly .
    I am moving to different shopping cart like ubbercart .. and the site i just built will be converted to that ,so i guess i will have to put all my effort on learning new cart .

  7. #7
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: overlay soldout image help needed


 

 

Similar Threads

  1. v150 overlay text on image
    By xr3461 in forum General Questions
    Replies: 4
    Last Post: 18 Apr 2013, 08:10 AM
  2. Product Image Overlay by attribute selection
    By azzoor in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 6 Feb 2011, 12:44 PM
  3. Product listing image - a text overlay
    By simlqd in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 4 Feb 2011, 10:46 PM
  4. help with image overlay
    By keepondraggin in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 26 Feb 2009, 09:01 PM
  5. soldout image on newlisting on index page
    By keenskin in forum Basic Configuration
    Replies: 1
    Last Post: 28 Nov 2007, 06:30 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR