close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

100% Discount

Thread began 10/31/2009 7:33 am by 4egidio363291 | Last modified 11/04/2009 6:03 pm by Eric Mittman | 1774 views | 7 replies |

4egidio363291

100% Discount

I want to allow my users to list items for sale for free for a limited time offer. I successfully created a 100% discount in my ecart object so my total always equals 0. However, the next step to complete the transaction would be to go to paypal and enter credit card. This would activate the IPN which changes the value of the product to "1" in order to put the item up for sale on the listings. Basically a user pays me a $1 to list their product but I want to them to be able to list for free. How can I get my IPN to activate without sending to paypal?

Thanks

Sign in to reply to this post

Eric Mittman

I think this would require a new custom page that works similar to your IPN but does not wait for the IPN post to do it's processing. This is a very custom checkout solution that I do not have specific directions for but the idea would be to transfer the important elements of your IPN page to this new alternative checkout page you have in place. Then when the user goes through the checkout if the total is 0 and they have items in the cart rather than go to PayPal you would have them go to this alternate page that would store the order info into the db and also send out an email. This is just a high level overview and the implementation will be a bit custom but this is the general idea.

Sign in to reply to this post

4egidio363291

Custom IPN

Thanks Eric
How do create this IPN page? Do I put in a ticket?

Sign in to reply to this post

Eric Mittman

This would be an alternate to your existing IPN page, so it would not have to do any of the tricky IPN stuff that your current IPN page is doing.

You can start out with a new blank page that just has some of the same server behaviors as the IPN page does. Based on what you have posted here you should have a store order summary to update the table in the db to indicate the order was successful. Next you would want to add in your Universal Email server behavior to this page. For the redirect you can send the user to your checkout success page.

Sign in to reply to this post

4egidio363291

bypass paypal

How do I bypass going to paypal? A user adds a game to the checkout, it goes to the confirm page and then to paypal.

Sign in to reply to this post

4egidio363291

Here is the form on the confirm page

?>
<div class="eC_Simple_Pacifica_Arial">

<div class="eC_CheckoutFormWrapper">
<form name="checkout_PP_LI_Hid" action="https://www.PayPal.com/cgi-bin/webscr" method="post">

<table class="eC_ButtonWrapper" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<input type="hidden" name="business" id="business" value="support@buyorsellvideogames.com" />
<?php $buy_Index = $buy->DisplayIndex - 1;?><?php
while (!$buy->EOF()) {
?>
<?php $buy_Index ++;?>

<?php //WA eCart Validation
if ((WA_eCart_FormatNumber($buy->DisplayInfo("Price") - (($buy->DisplayInfo("Price")/$buy->TotalColumn("TotalPrice")) * $buy->GetDiscounts()), false, 2) > 0)) {
?>
<input type="hidden" name="amount_<?php echo $buy_Index+1; ?>" id="amount_<?php echo $buy_Index+1; ?>" value="<?php echo WA_eCart_FormatNumber($buy->DisplayInfo("Price") - (($buy->DisplayInfo("Price")/$buy->TotalColumn("TotalPrice")) * $buy->GetDiscounts()), false, 2) ?>" />
<input type="hidden" name="item_name_<?php echo $buy_Index+1; ?>" id="item_name_<?php echo $buy_Index+1; ?>" value="<?php echo $buy->DisplayInfo("Name") ?>" />
<input type="hidden" name="item_number_<?php echo $buy_Index+1; ?>" id="item_number_<?php echo $buy_Index+1; ?>" value="<?php echo $buy->DisplayInfo("ID") ?>" />
<input type="hidden" name="quantity_<?php echo $buy_Index+1; ?>" id="quantity_<?php echo $buy_Index+1; ?>" value="<?php echo $buy->DisplayInfo("Quantity") ?>" />
<input type="hidden" name="on0_<?php echo $buy_Index+1; ?>" id="on0_<?php echo $buy_Index+1; ?>" value="" />
<input type="hidden" name="os0_<?php echo $buy_Index+1; ?>" id="os0_<?php echo $buy_Index+1; ?>" value="" />
<input type="hidden" name="on1_<?php echo $buy_Index+1; ?>" id="on1_<?php echo $buy_Index+1; ?>" value="" />
<input type="hidden" name="os1_<?php echo $buy_Index+1; ?>" id="os1_<?php echo $buy_Index+1; ?>" value="" />
<?php //WA eCart Validation
}
else {
$buy_Index --;
}
?>
<?php
$buy->MoveNext();
}
$buy->MoveFirst();
?>
<input type="hidden" name="handling_cart" id="handling_cart" value="<?php echo ($buy->GetShipping() + $buy->GetCharges()); ?>" />
<input type="hidden" name="tax_cart" id="tax_cart" value="<?php echo $buy->GetTax() ?>" />
<input type="hidden" name="no_note" id="no_note" value="0" />
<input type="hidden" name="invoice" id="invoice" value="<?php echo session_id(); ?>" />
<input type="hidden" name="no_shipping" id="no_shipping" value="1" />
<input type="hidden" name="cancel_return" id="cancel_return" value="" />
<input type="hidden" name="return" id="return" value="http://www.buyorsellvideogames.com/checkout_success.php" />
<input type="hidden" name="cmd" id="cmd" value="_cart" />
<input type="hidden" name="upload" id="upload" value="1" />
<input type="hidden" name="currency_code" id="currency_code" value="USD" />
<input type="hidden" name="address_override" id="address_override" value="0" />
<input type="hidden" name="first_name" id="first_name" value="<?php echo((isset($_POST["firstname"]))?$_POST["firstname"]:"") ?>" />
<input type="hidden" name="last_name" id="last_name" value="<?php echo((isset($_POST["lastname"]))?$_POST["lastname"]:"") ?>" />
<input type="hidden" name="address1" id="address1" value="<?php echo((isset($_POST["street1"]))?$_POST["street1"]:"") ?>" />
<input type="hidden" name="address2" id="address2" value="<?php echo((isset($_POST["street2"]))?$_POST["street2"]:"") ?>" />
<input type="hidden" name="city" id="city" value="<?php echo((isset($_POST["city"]))?$_POST["city"]:"") ?>" />
<input type="hidden" name="state" id="state" value="<?php echo((isset($_POST["state_province"]))?$_POST["state_province"]:"") ?>" />
<input type="hidden" name="zip" id="zip" value="<?php echo((isset($_POST["postcode"]))?$_POST["postcode"]:"") ?>" />
<input type="hidden" name="country" id="country" value="<?php echo((isset($_POST["country"]))?$_POST["country"]:"") ?>" />
<input type="image" alt="Modify information" value="Modify information" src="WA_eCart/Images/Pacifica/Btn5_EN_modifyinformation.gif" onclick="history.back();return false;"/>
<input type="image" name="Submit_order" id="Submit_order" value="Checkout" alt="Submit order" src="WA_eCart/Images/Pacifica/Btn5_EN_submitorder.gif" /> </td>
</tr>
</table>
</form>

Sign in to reply to this post

4egidio363291

Cart won't clear

I changed the following line:

<form name="checkout_PP_LI_Hid" action="https://www.PayPal.com/cgi-bin/webscr" method="post">

To redirect to my index page. It add the game fine but it won't clear my shopping cart.
Any suggestions?

Thanks

Sign in to reply to this post

Eric Mittman

I thought that we had some problems getting the session to be cleared properly in the past. There should be code on your checkout success page that will clear out the session for you properly.

Here are a couple of ways to clear the session:

php:
session_destroy();

unset($_SESSION);



You could use the clear cart code as well, it look like this:

php:
$your cart name->ClearCart();
Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...