RECOMMENDATION: If you are using a version of The Portal Connector higher than 4.0, we strongly recommend utilizing the MVC based widgets and components to create your site. This documentation is for legacy purposes only and will soon be deprecated.
Widget Type:
Form Widgets
TPC Version:
  • 4.0 +
VideoLogos
The TPC Pay Button widget is used to pay towards a numeric field. It can also be used to generate an order. If the pay button widget is being used on a form that's configured to use the Orders entity, it will complete the order. If the pay button widget is being used on any other entity, it will add an item - the price of which is determined by the set numeric field in the total price attribute field - to your shopping cart and create a new order once your checkout. Please note that this widget will only work if you have an ecommerce enabled license. 

Similar to Submit Button, the Pay Button would also submit the form and redirect to a configurable page.

Configuration

Basic Setup

Once your setup all the field on the form drag and drop the pay button to the form body. Click on the edit and it will prompt you with the widget designer.

From the widget designer, you can set the button text, Product name prefix, ID of the attribute, Total price attribute, what action need to take once the form is submitted, update the status option.

It also allows you to restrict payment for specific statuses. Once you finish configure the widget click on save. 

pay-button

Widget Properties

Basic Properties

ButtonText

ButtonText property will enables you to set the user facing text of the button. 

Product Name Prefix

The Product Name Prefix property allows you to set a prefix for a newly created shopping cart item.

ID Attribute

The ID Attribute property will append a records' field (Such as full name or account number) to a shopping cart item. This can be used to distinguish items in a shopping cart.

Total Price Attribute

The Total Price Attribute property allows you to select any numerical field from which the total owing amount of the order will be determined. This will be reflected in the shopping cart as well.

Submit Action

This property will allow you to determine what will happen when a user clicks on the donate button. Firstly, None will simply do nothing other than submit the donation once the donation button has been clicked. Redirect to a Page will redirect the user to a specified page once the donation has been submitted. Finally, Refresh will refresh the entire page once a donation has been submitted.

Update Status

The Update Status property allows you to change the status of a record.

ClearCartBeforeAdd

When this property set to true it will clear cart before you add a new product  

ButtonClass

ButtonClass property enables you to set the classes for the button. By default, it set to default bootstrap button classes.(btn btn-default).

ToolTipPosition

This property determines the position of the tool tip. By default this property is set to "Auto". You can change this to Left , Right , Top , Bottom. 

Tool Tip

The Tool Tip allows you to add a description or Hint to your widget.

Advanced Properties

Advanced properties provide additional functionality. They can be accessed by clicking on the "Advanced" Button in the bottom right corner of the widget designer.

ButtonText

ButtonText property will enables you to set the user facing text of the button. 

Product Name Prefix

The Product Name Prefix property allows you to set a prefix for a newly created shopping cart item.

ID Attribute

The ID Attribute property will append a records' field (Such as full name or account number) to a shopping cart item. This can be used to distinguish items in a shopping cart.

Total Price Attribute

The Total Price Attribute property allows you to select any numerical field from which the total owing amount of the order will be determined. This will be reflected in the shopping cart as well.

Submit Action

This property will allow you to determine what will happen when a user clicks on the donate button. Firstly, None will simply do nothing other than submit the donation once the donation button has been clicked. Redirect to a Page will redirect the user to a specified page once the donation has been submitted. Finally, Refresh will refresh the entire page once a donation has been submitted.

Update Status

The Update Status property allows you to change the status of a record.

ClearCartBeforeAdd

When this property set to true it will clear cart before you add a new product  

ButtonClass

ButtonClass property enables you to set the classes for the button. By default, it set to default bootstrap button classes.(btn btn-default).

ToolTipPosition

This property determines the position of the tool tip. By default this property is set to "Auto". You can change this to Left , Right , Top , Bottom. 

Tool Tip

The Tool Tip allows you to add a description or Hint to your widget.

API

get_type()

Returns the widget type.

Returns

String

add_click()

Allows the addition of a click event to the pay button.

Returns

None

remove_click()

Allows the removal of a click event from the pay button.

Returns

Function

get_container()

Returns the container element of the widget.     

Returns

jQuery Object     

get_element()

Returns the element of the widget.

Returns

jQuery Object

get_input()

Returns the input of the widget.

Returns

jQuery Object

hide()

Hides the widget from the form.

Returns

None

show()

Shows the widget on the form.

Returns

None

toggle()

Toggles the visibility of the widget.

Returns

None

get_model()

Returns the model object of the widget, which contains several useful properties related to the widget.

Returns

Object

enable()

Enables the widget on the form.

Returns

None

disable()

Disables the widget on the form.

Returns

None

enableRedirect()

Enables redirection on the form submission.

Returns

None

disableRedirect()

Disables redirection on the form submission.

Returns

None

add_queryParam()

Allows the addition of querystring parameters.

Returns

None

set_redirectUrl()

Sets the redirect URL.

Returns

None

get_redirectUrl()

Returns the redirect URL.

Returns

URL String

get_formAction()

Returns the form actions object of the widget.

Returns

Object

readonly()

Sets the widget state to read only.

Returns

None