PHP 클래스 ShoppingCart_Controller, silvershop-core

상속: extends Controller
파일 보기 프로젝트 열기: burnbright/silverstripe-shop 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$cart

공개 메소드들

메소드 설명
add ( SS_HTTPRequest $request ) : SS_HTTPResponse Action: add item to cart
add_item_link ( Buyable $buyable, $parameters = [] )
clear ( $request ) : AjaxHTTPResponse | boolean Action: clear the cart
debug ( ) Displays order info and cart contents.
direct ( boolean | string $status = true ) : boolean This is used here and in VariationForm and AddProductForm
index ( ) Handle index requests
init ( )
remove ( SS_HTTPRequest $request ) : SS_HTTPResponse Action: remove a certain number of items from the cart
remove_all_item_link ( Buyable $buyable, $parameters = [] )
remove_item_link ( Buyable $buyable, $parameters = [] )
removeall ( SS_HTTPRequest $request ) : SS_HTTPResponse Action: remove all of an item from the cart
set_quantity_item_link ( Buyable $buyable, $parameters = [] )
setquantity ( $request ) : AjaxHTTPResponse | boolean Action: update the quantity of an item in the cart

보호된 메소드들

메소드 설명
build_url ( $action, $buyable, $params = [] ) Helper for creating a url
buyableFromRequest ( ) : Product | ProductVariation | Buyable
params_to_get_string ( $array ) Creates the appropriate string parameters for links from array
updateLocale ( $request )

메소드 상세

add() 공개 메소드

Action: add item to cart
public add ( SS_HTTPRequest $request ) : SS_HTTPResponse
$request SS_HTTPRequest
리턴 SS_HTTPResponse

build_url() 보호된 정적인 메소드

Helper for creating a url
protected static build_url ( $action, $buyable, $params = [] )

buyableFromRequest() 보호된 메소드

protected buyableFromRequest ( ) : Product | ProductVariation | Buyable
리턴 Product | ProductVariation | Buyable

clear() 공개 메소드

Action: clear the cart
public clear ( $request ) : AjaxHTTPResponse | boolean
$request
리턴 AjaxHTTPResponse | boolean

debug() 공개 메소드

Displays order info and cart contents.
public debug ( )

direct() 공개 정적인 메소드

This is used here and in VariationForm and AddProductForm
public static direct ( boolean | string $status = true ) : boolean
$status boolean | string
리턴 boolean

index() 공개 메소드

Handle index requests
public index ( )

init() 공개 메소드

public init ( )

params_to_get_string() 보호된 정적인 메소드

Produces string such as: MyParam%3D11%26OtherParam%3D1 ...which decodes to: MyParam=11&OtherParam=1 you will need to decode the url with javascript before using it.
protected static params_to_get_string ( $array )

remove() 공개 메소드

Action: remove a certain number of items from the cart
public remove ( SS_HTTPRequest $request ) : SS_HTTPResponse
$request SS_HTTPRequest
리턴 SS_HTTPResponse

removeall() 공개 메소드

Action: remove all of an item from the cart
public removeall ( SS_HTTPRequest $request ) : SS_HTTPResponse
$request SS_HTTPRequest
리턴 SS_HTTPResponse

setquantity() 공개 메소드

Action: update the quantity of an item in the cart
public setquantity ( $request ) : AjaxHTTPResponse | boolean
$request
리턴 AjaxHTTPResponse | boolean

updateLocale() 보호된 메소드

protected updateLocale ( $request )

프로퍼티 상세

$cart 보호되어 있는 프로퍼티

protected $cart