-
Notifications
You must be signed in to change notification settings - Fork 3
shop
Adam Jimenez edited this page Jan 6, 2020
·
1 revision
Ecommerce class
array $shop->basket
Array of basket items
$shop->add_to_basket( int $product, int $quantity=1, bool $buy_now=false)
Takes a product id and quantity and adds to the basket. If $buy_now is true - the user will be redirected to the basket.
$shop->set_delivery( dec $price )
Sets the current delivery price
int $shop->prepare()
Create an order with statu pending ready to go to the payment gateway. The order id is returned.
$shop->paypal_button( string $value='Pay using paypal click here' )
Outputs a paypal payment button.
$shop->worldpay_button( string $value='Pay using worldpay click here' )
Outputs a worldpay payment button.