espacio Posted March 31, 2005 Share Posted March 31, 2005 (edited) i make it :-) Edited March 31, 2005 by espacio Quote Link to comment Share on other sites More sharing options...
Arien Posted April 4, 2005 Share Posted April 4, 2005 Hi, Nice contrib - thanks, it has improved the store no end. I operate my store a little differently than many people seem to though. I need 3 different states: 1) In Stock (where stock quantity > 0) 2) Out of stock (where stock quantity =<0) 3) On order (where products_date_available > today) Is it possible for this contrib to look at the products_date_available field in the database and show the 'on order' graphic if it's on order? Many thanks Peter <{POST_SNAPBACK}> I want to do this aswell.. i got as far as this.. if ($products_date_available > date("Y-m-d H:i:s")) { $picto = tep_image(DIR_QUANTITY_ICONS.'on_order.gif'); } However this doesn't work, i'm assuming because the date function isn't right... can anyone help me work out what to do? I tried entering the date manually and the whole shop died saying there was an error on the general.php file. Quote Link to comment Share on other sites More sharing options...
Arien Posted April 4, 2005 Share Posted April 4, 2005 It's all fixed and works perfectly. I've even made it so it tells you how many days left till it's in stock. Let me know if you want this :). Quote Link to comment Share on other sites More sharing options...
ppollock Posted April 4, 2005 Share Posted April 4, 2005 It's all fixed and works perfectly. I've even made it so it tells you how many days left till it's in stock. Let me know if you want this :). <{POST_SNAPBACK}> Please, please, please tell us how. I've been trying to do this for months! Thank you in advance. Peter Quote Link to comment Share on other sites More sharing options...
Arien Posted April 4, 2005 Share Posted April 4, 2005 Please, please, please tell us how. I've been trying to do this for months! Thank you in advance. Peter <{POST_SNAPBACK}> Do you have MSN/ICQ/AIm or IRC? The coding is very messy at the moment and i'd have to guide you through it. Regards. Rob. Quote Link to comment Share on other sites More sharing options...
karamelos Posted April 22, 2005 Share Posted April 22, 2005 Hi i have some problem with the script, first of all i wanna know from where the hell it get the $listing variable or function what ever! why that? becouse i wanna parse two variables in the function and not only one you use the: $lc_align = 'center'; // $lc_text = ' ' . $listing['products_quantity'] . ' '; $lc_text = ' ' . picto_qty($listing['products_quantity']) . ' '; but i wanna use this: $lc_align = 'center'; // $lc_text = ' ' . $listing['products_quantity'] . ' '; $lc_text = ' ' . picto_qty($listing['products_quantity'], $listing['posotita_prom']) . ' '; and then in the general.php i make this: function picto_qty($quantity=0,prom_avail=0) { global $warning_stock ; if ($quantity > 0 ) { $picto = tep_image(DIR_QUANTITY_ICONS.'stock_green_6.gif', TEXT_STOCK_24).'<br>'. TEXT_STOCK_24 ; } elseif (($prom_avail == 0 ) and ($quantity == 0 )) { $picto = tep_image(DIR_QUANTITY_ICONS.'stock_red_6.gif', TEXT_STOCK_BUY).'<br>'. TEXT_STOCK_BUY ; } elseif (($prom_avail >= 1 ) and ($quantity == 0 )) { $picto = tep_image(DIR_QUANTITY_ICONS.'stock_orange_4.gif', TEXT_STOCK_DAYS).'<br>'. TEXT_STOCK_DAYS ; } elseif (($prom_avail >= 10 ) and ($quantity == 0 )) { $picto = tep_image(DIR_QUANTITY_ICONS.'stock_green_5.gif', TEXT_STOCK_SOON).'<br>'. TEXT_STOCK_SOON ; } elseif (($prom_avail == $null ) and ($quantity == 0 )) { $picto = tep_image(DIR_WS_ICONS.'pixel_trans.gif', TEXT_STOCK_TIME).'<br>'. TEXT_STOCK_TIME ; } else { $picto = tep_image(DIR_QUANTITY_ICONS.'pixel_trans.gif', TEXT_STOCK_TIME ).'<br>'. TEXT_STOCK_TIME ; } return $picto; } So my question is , how should i pass a variable from my database? i can pass all the other variable that exist in my database, but not the one that i have make for all products , why ??? :( Quote Link to comment Share on other sites More sharing options...
Guest Posted April 22, 2005 Share Posted April 22, 2005 Hi i have some problem with the script, first of all i wanna know from where the hell it get the $listing variable or function what ever! why that?becouse i wanna parse two variables in the function and not only one you use the: $lc_align = 'center'; // $lc_text = ' ' . $listing['products_quantity'] . ' '; $lc_text = ' ' . picto_qty($listing['products_quantity']) . ' '; but i wanna use this: $lc_align = 'center'; // $lc_text = ' ' . $listing['products_quantity'] . ' '; $lc_text = ' ' . picto_qty($listing['products_quantity'], $listing['posotita_prom']) . ' '; and then in the general.php i make this: function picto_qty($quantity=0,prom_avail=0) { global $warning_stock ; if ($quantity > 0 ) { $picto = tep_image(DIR_QUANTITY_ICONS.'stock_green_6.gif', TEXT_STOCK_24).'<br>'. TEXT_STOCK_24 ; } elseif (($prom_avail == 0 ) and ($quantity == 0 )) { $picto = tep_image(DIR_QUANTITY_ICONS.'stock_red_6.gif', TEXT_STOCK_BUY).'<br>'. TEXT_STOCK_BUY ; } elseif (($prom_avail >= 1 ) and ($quantity == 0 )) { $picto = tep_image(DIR_QUANTITY_ICONS.'stock_orange_4.gif', TEXT_STOCK_DAYS).'<br>'. TEXT_STOCK_DAYS ; } elseif (($prom_avail >= 10 ) and ($quantity == 0 )) { $picto = tep_image(DIR_QUANTITY_ICONS.'stock_green_5.gif', TEXT_STOCK_SOON).'<br>'. TEXT_STOCK_SOON ; } elseif (($prom_avail == $null ) and ($quantity == 0 )) { $picto = tep_image(DIR_WS_ICONS.'pixel_trans.gif', TEXT_STOCK_TIME).'<br>'. TEXT_STOCK_TIME ; } else { $picto = tep_image(DIR_QUANTITY_ICONS.'pixel_trans.gif', TEXT_STOCK_TIME ).'<br>'. TEXT_STOCK_TIME ; } return $picto; } So my question is , how should i pass a variable from my database? i can pass all the other variable that exist in my database, but not the one that i have make for all products , why ??? :( <{POST_SNAPBACK}> Hi karamelos, I see your point, but my knowledge of PhP and MqSQL is poor, so i'm sorry I can't help you about this issue. Quote Link to comment Share on other sites More sharing options...
karamelos Posted April 22, 2005 Share Posted April 22, 2005 Hi i have some problem with the script, first of all i wanna know from where the hell it get the $listing variable or function what ever! why that?becouse i wanna parse two variables in the function and not only one you use the: $lc_align = 'center'; // $lc_text = ' ' . $listing['products_quantity'] . ' '; $lc_text = ' ' . picto_qty($listing['products_quantity']) . ' '; but i wanna use this: $lc_align = 'center'; // $lc_text = ' ' . $listing['products_quantity'] . ' '; $lc_text = ' ' . picto_qty($listing['products_quantity'], $listing['posotita_prom']) . ' '; and then in the general.php i make this: function picto_qty($quantity=0,prom_avail=0) { global $warning_stock ; if ($quantity > 0 ) { $picto = tep_image(DIR_QUANTITY_ICONS.'stock_green_6.gif', TEXT_STOCK_24).'<br>'. TEXT_STOCK_24 ; } elseif (($prom_avail == 0 ) and ($quantity == 0 )) { $picto = tep_image(DIR_QUANTITY_ICONS.'stock_red_6.gif', TEXT_STOCK_BUY).'<br>'. TEXT_STOCK_BUY ; } elseif (($prom_avail >= 1 ) and ($quantity == 0 )) { $picto = tep_image(DIR_QUANTITY_ICONS.'stock_orange_4.gif', TEXT_STOCK_DAYS).'<br>'. TEXT_STOCK_DAYS ; } elseif (($prom_avail >= 10 ) and ($quantity == 0 )) { $picto = tep_image(DIR_QUANTITY_ICONS.'stock_green_5.gif', TEXT_STOCK_SOON).'<br>'. TEXT_STOCK_SOON ; } elseif (($prom_avail == $null ) and ($quantity == 0 )) { $picto = tep_image(DIR_WS_ICONS.'pixel_trans.gif', TEXT_STOCK_TIME).'<br>'. TEXT_STOCK_TIME ; } else { $picto = tep_image(DIR_QUANTITY_ICONS.'pixel_trans.gif', TEXT_STOCK_TIME ).'<br>'. TEXT_STOCK_TIME ; } return $picto; } So my question is , how should i pass a variable from my database? i can pass all the other variable that exist in my database, but not the one that i have make for all products , why ??? :( <{POST_SNAPBACK}> Greaaaaatttttttttt!!!!!!!! :((((((( now where should i ask for this ??? :((( Quote Link to comment Share on other sites More sharing options...
Tamsyn Posted May 10, 2005 Share Posted May 10, 2005 Great contribution, but I can't quite get it working. When I upload the changed configure.php file, I lose the colour and images from my site. I can't understand why adding one define line does this. I've checked the name and position of the qicons directory but nothing works. Help :o Tamsyn Quote Link to comment Share on other sites More sharing options...
verbalkent Posted October 4, 2005 Share Posted October 4, 2005 I want to do this aswell.. i got as far as this.. if ($products_date_available > date("Y-m-d H:i:s")) { $picto = tep_image(DIR_QUANTITY_ICONS.'on_order.gif'); } However this doesn't work, i'm assuming because the date function isn't right... can anyone help me work out what to do? I tried entering the date manually and the whole shop died saying there was an error on the general.php file. Any Follow up on this?? I would like this feature also. Please let us know the answer. :) Quote Link to comment Share on other sites More sharing options...
Guest Posted October 18, 2005 Share Posted October 18, 2005 Hi Is there anyway to add the stock qtys images to the specials page and new products page I have in the root of my store front Mark Quote Link to comment Share on other sites More sharing options...
Noerd Posted March 14, 2006 Share Posted March 14, 2006 I just tried to install it but no success for now. I get the following message when I enter the site. Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/xxxxxxxxxxx/HTML/catalog/includes/languages/dutch.php on line 314 I can not find the problem (with my poor PHP knowledge). Can anybody give me a hint! thanks in advance. Gauthier Quote Link to comment Share on other sites More sharing options...
Guest Posted May 10, 2006 Share Posted May 10, 2006 Please Help Me ive installed this contribution, but i also have the allprods contribution (AllProducts_V_4.4), the problem im having is that my categories product listing all work fine but my click here to view all products(with image) product listing (which is actually the same page referenced by allprods.php) gives me a quantity of -8? please assist my problem can be found on http://www.adbmarketing.org/catalog This incorrect quantity in result does not show the buy button because i have the contribution no buy button if quantity < 0. where did i go wrong? my php level is poor, but i try Quote Link to comment Share on other sites More sharing options...
Ynkryggen Posted August 20, 2006 Share Posted August 20, 2006 Thanks for this contrib! Just what I was looking for! But, is it possible to remove the "buy now"-button if status of the product is EOL (End of life)? Thanks! Quote Link to comment Share on other sites More sharing options...
alimantando Posted September 22, 2006 Share Posted September 22, 2006 EXAMPLE: If you use -300 for stock status <available in 1 week> and someone orders a productm the stock number will be changed from -300 to -301 and so on. SO with other words, after selling more then 100 products it will have passed the number of -399, and the produckt availability will be changed to the next availability order you have set. NOTE: Depending how mutch products you sell, you may have to reset the stock back to -300 (so keep that in mind) That seams kind of silly to me. I think if one changes in the "checkout_process.php" (arround 150ish) the line $stock_left = $stock_values['products_quantity'] - $order->products[$i]['qty']; to if($stock_values['products_quantity']>0){ $stock_left = $stock_values['products_quantity'] - $order->products[$i]['qty']; if($stock_left<0){$stock_left=0} }else{ $stock_left = $stock_values['products_quantity']; } the shop will stop counting negativ stock numbers down. I hope so. Since my Shop does not count down at all, I will not test it :D . By the way: What does <?php echo $lc_text = '' . picto_qty($product_info['products_quantity']) . ''; ?> do? I changed it to a <?php $lc_text = '' . picto_qty($product_info['products_quantity']) . ''; echo $lc_text; ?> for me. I am not sure if this does the same. Sugestions? Quote Link to comment Share on other sites More sharing options...
Guest Posted January 22, 2008 Share Posted January 22, 2008 Do I just need to download the last 1 or all of them. Quote Link to comment Share on other sites More sharing options...
tack68 Posted June 20, 2008 Share Posted June 20, 2008 demo plz Quote Link to comment Share on other sites More sharing options...
marco99 Posted August 6, 2008 Share Posted August 6, 2008 Hi I installed this contribution and it works fine on product_listing.php, but not on product_info.php. Here it always shows the red "out of stock" image. What could be the problem/solution? I am using STS - could this be the problem? please help. thanks marco Quote Link to comment Share on other sites More sharing options...
Guest Posted November 22, 2008 Share Posted November 22, 2008 Hi I installed this contribution and it works fine on product_listing.php, but not on product_info.php. Here it always shows the red "out of stock" image. What could be the problem/solution? I am using STS - could this be the problem? please help. thanks marco I Have the same problems but on "new_products.php"... Anyone have an idea how can i solve this Quote Link to comment Share on other sites More sharing options...
Guest Posted November 22, 2008 Share Posted November 22, 2008 I Have the same problems but on "new_products.php"... Anyone have an idea how can i solve this Solved, :blink: Quote Link to comment Share on other sites More sharing options...
Guest Posted March 16, 2009 Share Posted March 16, 2009 (edited) I installed this contribution and it works fine on product_listing.php, but not on product_info.php. Here it always shows the red "out of stock" image. i have the same problem. Have we news for this? Edited March 16, 2009 by Grorakel Quote Link to comment Share on other sites More sharing options...
mikimiguelon Posted September 27, 2010 Share Posted September 27, 2010 (edited) Hi Guys, I'm from Spain,and i have a problem with the images. Instead of the images It displayed the blade to indicate the error and when I look at the image properties such as direction of the image I get: http://localhost/catalog/DIR_QUANTITY_ICONSstock_green_6.gif Why did't it change "DIR_QUANTITY_ICONS" to "images/icons/qicons/"??? Thanks. Edited September 27, 2010 by mikimiguelon Quote Link to comment Share on other sites More sharing options...
mikimiguelon Posted September 27, 2010 Share Posted September 27, 2010 It's ok Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.