Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

SoldOut (but displayed) - v0.1


Recommended Posts

  • 4 weeks later...


Sorry for my english


in the catalog/index.php

i have


<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>


and i want remplace with:

<!--Begin Sold Out-->


$products_sold_out = '';

$stock_left = tep_get_products_stock($products_id) - $products_quantity;

$products_sold_out = stock_left;

if ($stock_left > 0) {

$submit_button = tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);

} else {

$submit_button = tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/button_sold_out.gif', 'Sold Out', IMAGE_BUTTON_SOLD_OUT);



<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . $submit_button; ?></td>

<!--End Sold Out-->



and in the



but if i change it

the website showme add to cart yet





Link to comment
Share on other sites

  • 2 months later...

:blink: Have you had any luck with the sold out button? I have the same problem! If someone gave you the resolution please let me know.



For those that help... THANKS. For those that would like to help and dont know how to... Thanks. For those that know how to help and dont help... Thanks (there are always the nice people that do help).

Link to comment
Share on other sites

  • 8 months later...

If anyone was getting the following error on product_info and product_review


Warning: Division by zero in /home/test/public_html/home/includes/functions/html_output.php on line 116


Warning: Division by zero in /home/test/public_html/home/includes/functions/html_output.php on line 117


It can be resolved by changing this line of code


$submit_button = tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/button_sold_out.gif', 'Sold Out', IMAGE_BUTTON_SOLD_OUT);




$submit_button = tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/button_sold_out.gif', SoldOut);


This change is made in the author's provided code.

Link to comment
Share on other sites

  • 3 weeks later...

I *think* I followed the instructions, and it does work - it shows the sold.gif image for product that is out of stock. But, I do have one problem.

All of my product images are showing up twice - there are 2 columns of each product image.

Does anyone have any idea what I did wrong, and more important, what I need to do to fix it??


You can see what I am talking about here:

The Shop at Scribbles

Edited by lakauai
Link to comment
Share on other sites

  • 11 months later...

Lisa how did you get the SOLD image on the categories pages? I have JUST this minute installed SoldOut (but displayed) - v0.1 with the update readme to SoldOut (but displayed) - v0.2 but it only shows sold out on the actual product page and not on the categories which means customers can still buy the item.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...