Contributions
SoldOut (but displayed) - v0.1
SoldOut (but displayed) - v0.1
I'm running a store with a limited amount of (season-)products, so I wanted to display also the products that are sold out so that my visitors can view/compare/learn more about them until they are in stock again next time.
Only one file to change (not included in archive):
catalog/products_info.php
+ one image to add (included in archive):
catalog/includes/languages/english/images/buttons/button_sold_out.gif
For MS2 and MS1 (read Install.txt)
Expand All / Collapse All
find
In catalog/includes/languages/english.php (or any otherlanguage-file)
Add just before ?>
define('IMAGE_BUTTON_MORE_INFO, 'More Info');
replace the define('IMAGE_BUTTON_MORE_INFO, 'More Info');
with
define('IMAGE_BUTTON_MORE_INFO', 'More Info');
same file in attachement
Halo,
in the last file there was a bug in the file product_listing.php.
This information is the same like in the .RAR -File!
Now is this bug fixed. Here the solution:
replace:
//BEGIN SOLDOUT
if ($listing['products_quantity']>-0) {
$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
}
else{
$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=info_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('more_info.gif', IMAGE_BUTTON_MORE_INFO) . '</a> ';
}
//END SOLDOUT
with:
//BEGIN SOLDOUT
$quantity = tep_db_fetch_array(tep_db_query("select products_quantity from products where products_id like '".$listing["products_id"]."'"));
$lc_align = 'center';
if (intval($quantity['products_quantity']) > 0) {
$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
}else{
$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=info_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('more_info.gif', IMAGE_BUTTON_MORE_INFO) . '</a> ';
}
//END SOLDOUT
Greetingz from Bulgaria!
I've cleaned up the readme file.
::: New in this version! :::::::::::::::::::::::::::
1. If you have a product that has a price of 0.00 and want to hide that price and display a predefined text instead this is now possible.
2. Changed is that in the product listing the Buy Now button is replaced by a button that when clicked, it will take you to the product details instead of showing the no-active Sold Out Button. This is much more friendly for you customer.
I added a simple fix for the Category views "Buy Now" button. Now will show as "sold out" icon. This is not Full package, only contains the modification for category view, so install first the v0.4 and then this. Also added two buttons for category view (because are smaller than the other sold buttons included on 0.1 release).
Additional change to display the “sold out” items in the product overview (index.php) without the possibility to buy these Items.
Full Package less gif file.
Fixed errors & added new mods for all review sections
Full Package less gif file.
fix |
|
10 Nov 2006 |
|
hi
if the contribution does not work in your shop, then try to insert this code instead of what's written in the install.txt:
<!--Begin Sold Out-->
<?php
If ($product_info['products_quantity']>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-->
it doesn't check the cart contents. it just shows if there's more than 0 items in stock.
Just add this funtion to product_reviews.php too...
It's only test on MS2~ don't ask me how to change it with MS1...^^"
SoldOut (but displayed) - v0.1
I'm running a store with a limited amount of (season-)products, so I wanted to display also the products that are sold out so that my visitors can view/compare/learn more about them until they are in stock again next time.
Only one file to change (not included in archive):
catalog/products_info.php
+ one image to add (included in archive):
catalog/includes/languages/english/images/buttons/button_sold_out.gif
For MS2 and MS1 (read Install.txt)
Note: Contributions are used at own risk.