Class Shop

Description

Shop class

  • author: DevilDev

Located in /shop/Shop.php (line 7)

Modules
   |
   --Shop
Variable Summary
static Shop $_instance
mixed $_type
Method Summary
static Shop getInstance ()
string buyTransation (string $method, [ $type = 'paypal'])
string createPayByPayPal ([ $order_id = null])
void createPayBySofort ( $order_id)
void createPdfBill ( $order_id,  $user)
string errorTransaction ()
void FromTmpToOrder ( $tmp_id)
array getAddFirmData ()
array getOrderById (int $order_id, [string $table = 'orders'], [int $user_id = null])
string getProductLinesByOrderId (int $order_id)
void getProductsByOrderId ( $order_id)
array getProductsLines (array $all, [bool $mini = false])
array getStatus ()
stdClass getTmpBuyById (int $order_id)
string loadAdminBuysHtml ()
string loadBuyButton (int $product_id)
string loadCartBlockHtml ()
string loadMiniBuyButton ([int $product_id = null])
string loadMiniCartHtml ()
string loadMyBuyHtml ()
string loadMyCartHtml ()
string loadOrderDetailHtml ([int $order_id = null], [int $user_id = null])
void saveAddress ( $user_id)
void SessionToDb (User $user)
array setPaymentOk (array $data)
string successTransaction ()
Variables
static Shop $_instance = null (line 14)

Singleton instance

  • access: protected
mixed $_type = 'paypal' (line 18)
  • access: public
Methods
static method getInstance (line 28)

Returns an instance of Shop

Singleton pattern implementation

  • return: Provides a fluent interface
  • access: public
static Shop getInstance ()
buyTransation (line 839)

Buy Transaction

  • access: public
string buyTransation (string $method, [ $type = 'paypal'])
  • string $method
  • $type
createPayByLiqpay (line 988)
  • access: protected
void createPayByLiqpay ()
createPayByPayPal (line 885)

Cretae html Form for pay with help PayPal

  • return: html
  • access: public
string createPayByPayPal ([ $order_id = null])
  • $order_id
createPayByPrivat24 (line 972)

Cretae html Form for pay with help Privat24

  • return: html
  • access: protected
string createPayByPrivat24 ()
createPayBySofort (line 1937)
  • access: public
void createPayBySofort ( $order_id)
  • $order_id
createPayByWebmoney (line 1006)
  • access: protected
void createPayByWebmoney ()
createPdfBill (line 509)
  • access: public
void createPdfBill ( $order_id,  $user)
  • $order_id
  • $user
errorTransaction (line 1077)

Callback method for payment services

  • return: html
  • access: public
string errorTransaction ()
FromTmpToOrder (line 1117)
  • access: public
void FromTmpToOrder ( $tmp_id)
  • $tmp_id
getAddFirmData (line 1816)

Create array for all data current site

  • access: public
array getAddFirmData ()
getOrderById (line 1732)

Load order data with users one by order id

  • return: | boolean
  • access: public
array getOrderById (int $order_id, [string $table = 'orders'], [int $user_id = null])
  • int $order_id
  • string $table: load with table tmp or real
  • int $user_id
getOrderStatisticPerMonth (line 1855)
  • access: public
void getOrderStatisticPerMonth ()
getProductLinesByOrderId (line 1785)

Load html all products one by order id

  • return: html | boolean
  • access: public
string getProductLinesByOrderId (int $order_id)
  • int $order_id
getProductsByOrderId (line 1765)
  • access: public
void getProductsByOrderId ( $order_id)
  • $order_id
getProductsLines (line 595)

Create array params for products lines from cart

  • return: | bool
  • access: public
array getProductsLines (array $all, [bool $mini = false])
  • array $all
  • bool $mini
getStatus (line 40)

Get all statuses

  • access: public
array getStatus ()
getTmpBuyById (line 1288)

Load order by id

  • access: public
stdClass getTmpBuyById (int $order_id)
  • int $order_id
loadAdminBuysHtml (line 1306)

Create html page for admin buys

  • return: html | boolean
  • access: public
string loadAdminBuysHtml ()
loadBuyButton (line 686)

Create html button for buy

  • return: html button
  • access: public
string loadBuyButton (int $product_id)
  • int $product_id
loadCartBlockHtml (line 654)

Create html for cart block

Allow variable
$currency = current currency
$cart_products - html all products lines
$amount - count products in cart
$cart_summ - summ price in cart

  • return: html
  • access: public
string loadCartBlockHtml ()
loadMiniBuyButton (line 700)

Create html for mini button

  • return: html
  • access: public
string loadMiniBuyButton ([int $product_id = null])
  • int $product_id
loadMiniCartHtml (line 53)

Create min cart html block

Allow variable
$total_in_catr - count products in cart

  • access: public
string loadMiniCartHtml ()
loadMyBuyHtml (line 84)

Create html page buy in cart

Allow variable
$pay_way_lines - html all allowed payway
$showForm - bool true if not user
$currency - current currency
$user_address - user address if exists
$user_address_d - user address delivery if exists

  • return: html
  • access: public
string loadMyBuyHtml ()
loadMyCartHtml (line 726)

Create html for cart page

Allow variable
$defaultPrice delivery price
$freePrice - delivery max price for free delivery
$delivery_price - current delivery price
$currency - current currency
$my_cart_line - html all products in cart
$total_price_withot_tax - cart price withot tax
$total_tax - summ tax
$total_price_with_tax - summ cart with cart
$show_buy - bool true if $price more 0

  • return: html
  • access: public
string loadMyCartHtml ()
loadOrderDetailHtml (line 1622)

Create html for detail views from orders

  • return: | bool
  • access: public
string loadOrderDetailHtml ([int $order_id = null], [int $user_id = null])
  • int $order_id
  • int $user_id
notifyTransaction (line 1971)
  • access: public
void notifyTransaction ()
saveAddress (line 1832)
  • access: public
void saveAddress ( $user_id)
  • $user_id
SessionToDb (line 1904)
  • access: public
void SessionToDb (User $user)
  • User $user
setPaymentOk (line 1162)

Save buy with PayPal if service return success

  • access: public
array setPaymentOk (array $data)
  • array $data
successTransaction (line 1015)

Callback method for payment services

  • return: html
  • access: public
string successTransaction ()

Documentation generated on Fri, 19 Aug 2016 17:10:38 +0200 by phpDocumentor 1.4.3