WebSite X5Help Center

 
Philip P.
Philip P.
User

Addition to Cart Price Options  en

Author: Philip P.
Visited 681, Followers 1, Shared 0  

It would be useful to have a user definable price option in the product function where a user can input the payment amount themselves so that the invoice is processed with the payment. This would be useful for producing invoices for adhohoc payments, and also there are circumstances where 3rd party services may be purchased seperately. This could be for donations, or ad hoc services where price may not be fixed and you want to specify a price for the customer to input or if taking details manually to input and have the invoice produced. The main user input needed would be the price, and a description field would be useful for the business side to use as well. 

As far as I can see this isn't available in the professional edition.

Posted on the
2 ANSWERS
Philip P.
Philip P.
User
Author

I'm aware there are options like the paypal pro beta etc, which I have yet to try out, but if not venturing that far I checked out the code which can be put into the shopping cart payment type list as a means of manually entering invoice data and processing a card after the invoice is produced. To enable cart and invoice processing I simply used a £0 product stating this would produce an invoice number and order description only and full invoice supplied on payment server processing of payment. You can normally edit paypal button scripts in this way.

The suggestion for the program is to have these field options within the product section so that you can fill in the service or product amount and its description by filling in a field within a product window to process using the payment system as usual.

Perhaps a custom field section for the code for these fields to accomodate different payment systems. So in this example I would put in:

 <input type="text" name="item_name" size="20">

in a custom code field to be able to type in a description, and:

<input type="text" name="amount" size="20">

to enter in an amount.

Which would then give a field to fill in manually on the site to take ad-hoc payments. There would ideally be a field name option to fill in the product design window to describe what to put in the field so the field has a description on the product when uploaded.

Here is the code I used in the payment type as custom code:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">

<input type="hidden" name="cmd" value="_xclick">

<input type="hidden" name="business" value="your paypal ID">

<input type="hidden" name="no_shipping" value="2">

<input type="hidden" name="no_note" value="1">

<input type="hidden" name="currency_code" value="GBP">

<input type="hidden" name="bn" value="PP-BuyNowBF">

<p align="centre">

<font size="2">Use this form if paying alternative amounts.</font><p>

<input type="text" name="item_name" size="20">

<p align="centre">

<font size="2">Enter Service Description in field above.</font><p>

<input type="text" name="item_number" size="20">

<p align="centre">

<font size="2">Copy and paste  invoice number in the field above.</font><p>

<input type="text" name="amount" size="20">

<p align="centre">

<font size="2">Enter amount in the

field here and click on the Paypal button</font></span></p>

<p>.<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but02.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">

<img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">

<font size="2">Click to make the payment</font><p>

</form>

Read more
Posted on the from Philip P.
Philip P.
Philip P.
User
Author

I resolved this more adequately by inspecting the X5cart.js code in the cart section for the buttons already made by the program. This works well and is functional in the emails too.

To edit this form for any particular site just change the domain and page names in the script which are in bold as yourdomainname etc and paste in in as a custom code in teh payment type in order management section of the shopping cart

You can't enter a field manually for country, it has to come from the script call so you need to include a country field in the customer form fields if wanting it to go to the default country properly, manual code you seem to loose the address being pre-filled, the code below prefills the address and details and defaults to the country specified in the customer form fields. 

This script will take you to the paypal with a £0 order where you can manually enter the amount, but all the customer data and invoce number details will be prefilled. 

The product I created was just a generalised payment product which can be anything like "Alternative payments" or "your specific service" which has variable payment options to manually process the payment or allow the customer to enter the amount and have the nececssary invoices produced for the order to check payment against. Explanation of the £0.00 invoice and fulll invoice from the payment server is explained in the payment option and product email message..

A one-off solution for a small business where you may want to just take ad-hoc payments or contributions on the internet and produce an invoice trail for the order and payments when not wanting to subscribe to more than a basic paypal account. If I find a way to make a product field fillable for price I'll post it.. but the program seems to use a pre-filled jave script file, so I may mess about with altering that to see if it allows a field to be filled somewhow...

Script is below....

<form>

<p align="centre">

<font size="2">Enter amount after pressing "Buy Now" below</font></span></p>

<a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&address_override=0&bn=IT_ICM-WPS&business=youremailprefix%40youremaildomain&item_name=Order%20number [UESCAPE_ORDER_NO]&item_number=[UESCAPE_ORDER_NO]&currency_code=GBP&button_subtype=services&no_note=0&charset=UTF%2d8&first_name=[UESCAPE_NAME]&last_name=[UESCAPE_LASTNAME]&address1=[UESCAPE_ADDRESS1]&address2=[UESCAPE_ADDRESS2]&city=[UESCAPE_CITY]&state=[UESCAPE_STATEREGION]&country=[UESCAPE_COUNTRYCODE]&zip=[UESCAPE_ZIPPOSTALCODE]&email=[UESCAPE_EMAIL]&lc=en_GB&return=https%3A%2F%2Fyourdomain%2yourwebreturnpage&cancel_return=https%3A%2F%2Fyourdomain%2Fyourreturnfailpage"><img src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"></a><img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">

</form>

Read more
Posted on the from Philip P.