Yith_Request_A_Quote implements Conditional, Registerable, Service
This class handles the integration with Yith Request A Quote.
Tags
Interfaces, Classes and Traits
- Conditional
- Registerable
- Service
Table of Contents
- $plugin : mixed
- $raq_content : mixed
- Content of session
- $session_class : mixed
- Session object
- __construct() : mixed
- add_button_single_page() : mixed
- Check if the button can be showed in single page
- add_item() : mixed
- add_item_to_quote() : mixed
- custom_css() : string
- Button's custom CSS styles
- exists() : bool
- Check if the product is in the list.
- get_errors() : string
- Get all errors in HTML mode or simple string.
- get_raq_for_session() : array<string|int, mixed>
- Get request quote list from session
- init() : mixed
- Initialize functions
- is_required() : mixed
- maybe_set_raq_cookies() : void
- Set Request a quote cookie.
- register() : mixed
- set_session() : void
- Sets the php session data for the request a quote
- show_button() : bool
- Filter the output of the button
- start_session() : mixed
- Initialize session and cookies
- set_rqa_cookies() : void
- Set hash cookie and items in raq.
Properties
$plugin
public
mixed
$plugin
$raq_content
Content of session
public
mixed
$raq_content
= array()
array
$session_class
Session object
public
mixed
$session_class
YITH_YWRAQ_Session
Methods
__construct()
public
__construct(Plugin $plugin) : mixed
Parameters
- $plugin : Plugin
Return values
mixed —add_button_single_page()
Check if the button can be showed in single page
public
add_button_single_page() : mixed
Tags
Return values
mixed —add_item()
public
add_item(mixed $data) : mixed
Parameters
- $data : mixed
Return values
mixed —add_item_to_quote()
public
add_item_to_quote() : mixed
Return values
mixed —custom_css()
Button's custom CSS styles
public
custom_css(mixed $css) : string
Parameters
- $css : mixed
Return values
string —exists()
Check if the product is in the list.
public
exists(int $product_id[, int|bool $variation_id = false ]) : bool
Parameters
- $product_id : int
-
Product ID.
- $variation_id : int|bool = false
-
Variation ID.
Return values
bool —get_errors()
Get all errors in HTML mode or simple string.
public
get_errors(array<string|int, mixed> $errors[, bool $html = true ]) : string
Parameters
- $errors : array<string|int, mixed>
-
Error list.
- $html : bool = true
-
Content type.
Tags
Return values
string —get_raq_for_session()
Get request quote list from session
public
get_raq_for_session() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —init()
Initialize functions
public
init() : mixed
Tags
Return values
mixed —is_required()
public
is_required() : mixed
Return values
mixed —maybe_set_raq_cookies()
Set Request a quote cookie.
public
maybe_set_raq_cookies() : void
Tags
Return values
void —register()
public
register() : mixed
Return values
mixed —set_session()
Sets the php session data for the request a quote
public
set_session([array<string|int, mixed> $raq_session = array() ][, bool $can_be_empty = false ]) : void
Parameters
- $raq_session : array<string|int, mixed> = array()
-
Quote list session.
- $can_be_empty : bool = false
-
Flag to check if the session can be empty.
Tags
Return values
void —show_button()
Filter the output of the button
public
show_button(bool $condition) : bool
Parameters
- $condition : bool
Tags
Return values
bool —$condition
start_session()
Initialize session and cookies
public
start_session() : mixed
Tags
Return values
mixed —set_rqa_cookies()
Set hash cookie and items in raq.
private
set_rqa_cookies([bool $set = true ]) : void
Parameters
- $set : bool = true
-
Flag to check if a cookie must be set.