Okay so following on from my products, i've came up with the idea to display a total amount of products people have.
So lets say user seller has 50 products and buyer comes along and buys 50 of them through paypal, how can i get the if tag to count that and END the item
So at the moment i'm getting the seller to imput the total amount he has in stock. the editable would be
stock_amount
if the stock = 50 but sells 50 =0 and ends the item to stop buyers buying more. So this would stop any issues where lets say someone advertises a item but only has one of them, and then once its sold it'll end the item and stop others trying to buy it.
The code i've got is this code for the buy it button to paypal
So lets say user seller has 50 products and buyer comes along and buys 50 of them through paypal, how can i get the if tag to count that and END the item
So at the moment i'm getting the seller to imput the total amount he has in stock. the editable would be
stock_amount
if the stock = 50 but sells 50 =0 and ends the item to stop buyers buying more. So this would stop any issues where lets say someone advertises a item but only has one of them, and then once its sold it'll end the item and stop others trying to buy it.
The code i've got is this code for the buy it button to paypal
- Code: Select all
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick"/>
<input type="hidden" name="business" value="<cms:show pp_email />"/>
<input type="hidden" name="item_name" value="<cms:show k_page_title />"/>
<input type="hidden" name="item_number" value="<cms:show k_page_id />"/>
<input type="hidden" name="amount" value="<cms:number_format pp_price />"/>
<input type="hidden" name="undefined_quantity" value="1"/>
<input type="hidden" name="item_address" value="No Street, Calverton, Nottingham, BG14"/>
<input type="hidden" name="show_shipping" value="1"/>
<input type="hidden" name="no_note" value="1"/>
<input type="hidden" name="currency_code" value="GBP"/>
<input type="hidden" name="rm" value="2"/>
<input type="hidden" name="custom" value="this is my address here">
<input type="hidden" name="return" value="http://www.torza.co.uk/selling/p_index.php?p=<cms:show k_page_id />"/>
<input type="hidden" name="cancel_return" value="http://www.torza.co.uk/selling/p_index.php?p=<cms:show k_page_id />"/>
<input type="hidden" value="http://www.torza.co.uk/selling/p_index.php?p=<cms:show k_page_id />&paypal_ipn=1" name="notify_url" />
<input type="submit" value="BUY NOW" class="button-style" />
</form>