: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
exit; // Exit if accessed directly
* Module Name: Add To Cart
class TB_Add_To_Cart_Module extends Themify_Builder_Component_Module {
parent::__construct(array(
'name' => __('Add To Cart', 'tbp'),
'category' => array('product_single')
public function get_assets() {
'ver'=>Tbp::get_version(),
'css'=>TBP_WC_CSS_MODULES.$this->slug.'.css'
public function get_icon(){
return 'shopping-cart-full';
public function get_options() {
'type' => 'toggle_switch',
'label' => __( 'Quantity', 'tbp'),
'on' => array( 'name' => 'yes', 'value' => 's' ),
'off' => array( 'name' => 'no', 'value' => 'h' ),
'label' => __('Button Label', 'tbp')
'id' => 'label_variable',
'label' => __('Variable Product Label', 'tbp')
'type' => 'toggle_switch',
'label' => __( 'Variable Product Add to Cart', 'tbp'),
'on'=>array( 'name' => 'yes' )
'wrap_class' => 'tbp_except_single_product_template',
'id' => 'label_outofstock',
'label' => __('Out of Stock Label', 'tbp')
'type' => 'toggle_switch',
'label' => __( 'Fullwidth', 'tbp'),
'on'=>array( 'name' => 'buttons-fullwidth' )
'hide' => array('alignment', 'display')
'show' => array('alignment', 'display')
array('type' => 'tbp_custom_css')
public function get_styling() {
self::get_expand('bg', array(
self::get_image('', 'b_i','bg_c','b_r','b_p')
self::get_image('', 'b_i','bg_c','b_r','b_p', 'h')
self::get_expand('f', array(
self::get_font_family('', 'f_f_g'),
self::get_color_type('','', 'f_c_t_g', 'f_c_g', 'f_g_c_g'),
self::get_font_size('', 'f_s_g', ''),
self::get_line_height('', 'l_h_g'),
self::get_letter_spacing(array(' .qty', '.module .button.alt'), 'l_s_g'),
self::get_text_align('', 't_a_g'),
self::get_text_transform(array(' .qty', '.module .button.alt'), 't_t_g'),
self::get_font_style(array(' .qty', '.module .button.alt'), 'f_st_g', 'f_w_g'),
self::get_text_decoration(array(' .qty', '.module .button.alt'), 't_d_r_g'),
self::get_text_shadow('','t_sh_g','h'),
self::get_font_family('', 'f_f_g_h'),
self::get_color_type('','', 'f_c_t_g_h', 'f_c_g_h', 'f_g_c_g_h'),
self::get_font_size('', 'f_s_g', '', 'h'),
self::get_line_height('', 'l_h_g', 'h'),
self::get_letter_spacing(array(' .qty', '.module .button.alt'), 'l_s_g', 'h'),
self::get_text_align('', 't_a_g', 'h'),
self::get_text_transform(array('', '.module .button.alt'), 't_t_g', 'h'),
self::get_font_style(array(' .qty', '.module .button.alt'), 'f_st_g', 'f_w_g', 'h'),
self::get_text_decoration(array(' .qty', '.module .button.alt'), 't_d_r_g', 'h'),
self::get_text_shadow('','t_sh_g','h'),
self::get_expand('l', array(
self::get_color(' a', 'l_c'),
self::get_text_decoration(' a', 't_d_l')
self::get_color(' a', 'l_c',null, null, 'hover'),
self::get_text_decoration(' a', 't_d_l', 'h')
self::get_expand('p', array(
self::get_padding('', 'p')
self::get_padding('', 'p', 'h')
self::get_expand('m', array(
self::get_margin('', 'm')
self::get_margin('', 'm', 'h')
self::get_expand('b', array(
self::get_border('', 'b')
self::get_border('', 'b', 'h')
'options' => count($a = self::get_blend('','fl'))>2 ? array($a) : $a
'options' => count($a = self::get_blend('','fl_h','h'))>2 ? array($a + array('ishover'=>true)) : $a
self::get_expand('w', array(
self::get_width('', 'w', 'h')
self::get_expand('r_c', array(
self::get_border_radius('', 'r_c')
self::get_border_radius('', 'r_c', 'h')
self::get_expand('sh', array(
self::get_box_shadow('', 'sh')
self::get_box_shadow('', 'sh', 'h')
self::get_expand('po', array( self::get_css_position())),
self::get_expand('disp', self::get_display())
self::get_expand('bg', array(
self::get_color('.module .quantity .qty', 'b_c_q_i', 'bg_c', 'background-color')
self::get_color('.module .quantity .qty', 'b_c_q_i', 'bg_c', 'background-color', 'h')
self::get_expand('f', array(
self::get_font_family('.module .quantity .qty', 'f_f_q_i'),
self::get_color('.module .quantity .qty', 'f_c_q_i'),
self::get_font_size('.module .quantity .qty', 'f_s_q_i', ''),
self::get_line_height('.module .quantity .qty', 'l_h_q_i'),
self::get_letter_spacing('.module .quantity .qty', 'l_s_q_i'),
self::get_text_transform('.module .quantity .qty', 't_t_q_i'),
self::get_font_style('.module .quantity .qty', 'f_st_q_i', 'f_w_q_i'),
self::get_text_decoration('.module .quantity .qty', 't_d_r_q_i'),
self::get_text_shadow('.module .quantity .qty','t_sh_q_i'),
self::get_font_family('.module .quantity .qty', 'f_f_q_i', 'h'),
self::get_color('.module .quantity .qty', 'f_c_q_i',null, null, 'h'),
self::get_font_size('.module .quantity .qty', 'f_s_q_i', '', 'h'),
self::get_line_height('.module .quantity .qty', 'l_h_q_i', 'h'),
self::get_letter_spacing('.module .quantity .qty', 'l_s_q_i', 'h'),
self::get_text_transform('.module .quantity .qty', 't_t_q_i', 'h'),
self::get_font_style('.module .quantity .qty', 'f_st_q_i', 'f_w_q_i', 'h'),
self::get_text_decoration('.module .quantity .qty', 't_d_r_q_i', 'h'),
self::get_text_shadow('.module .quantity .qty','t_sh_q_i', 'h'),
self::get_expand('p', array(
self::get_padding('.module .quantity .qty', 'p_q_i')
self::get_padding('.module .quantity .qty', 'p_q_i', 'h')
self::get_expand('m', array(
self::get_margin('.module .quantity .qty', 'm_q_i')
self::get_margin('.module .quantity .qty', 'm_q_i', 'h')
self::get_expand('b', array(
self::get_border('.module .quantity .qty', 'b_q_i')
self::get_border('.module .quantity .qty', 'b_q_i', 'h')
self::get_expand('r_c', array(
self::get_border_radius('.module .quantity .qty', 'r_c_q_i')
self::get_border_radius('.module .quantity .qty', 'r_c_q_i', 'h')
self::get_expand('sh', array(
self::get_box_shadow('.module .quantity .qty', 'sh_q_i')
self::get_box_shadow('.module .quantity .qty', 'sh_q_i', 'h')
$variable_select = array(
self::get_expand('bg', array(
self::get_color(' .variations select', 'b_c_v_s', 'bg_c', 'background-color')
self::get_color(' .variations select', 'b_c_v_s', 'bg_c', 'background-color', 'h')
self::get_expand('f', array(
self::get_font_family(' .variations select', 'f_f_v_s'),
self::get_color(' .variations select', 'f_c_v_s'),
self::get_font_size(' .variations select', 'f_s_v_s', ''),
self::get_line_height(' .variations select', 'l_h_v_s'),
self::get_letter_spacing(' .variations select', 'l_s_v_s'),
self::get_text_transform(' .variations select', 't_t_v_s'),
self::get_font_style(' .variations select', 'f_st_v_s', 'f_w_v_s'),
self::get_text_decoration(' .variations select', 't_d_r_v_s'),
self::get_text_shadow(' .variations select','t_sh_v_s'),
self::get_font_family(' .variations select', 'f_f_v_s', 'h'),
self::get_color(' .variations select', 'f_c_v_s',null, null, 'h'),
self::get_font_size(' .variations select', 'f_s_v_s', '', 'h'),
self::get_line_height(' .variations select', 'l_h_v_s', 'h'),
self::get_letter_spacing(' .variations select', 'l_s_v_s', 'h'),
self::get_text_transform(' .variations select', 't_t_v_s', 'h'),
self::get_font_style(' .variations select', 'f_st_v_s', 'f_w_atc_btn', 'h'),
self::get_text_decoration(' .variations select', 't_d_r_v_s', 'h'),
self::get_text_shadow(' .variations select','t_sh_v_s', 'h'),
self::get_expand('b', array(
self::get_border(' .variations select', 'b_v_s')
self::get_border(' .variations select', 'b_v_s', 'h')
self::get_expand('r_c', array(
self::get_border_radius(' .variations select', 'r_c_v_s')
self::get_border_radius(' .variations select', 'r_c_v_s', 'h')
self::get_expand('sh', array(
self::get_box_shadow(' .variations select', 'sh_v_s')
self::get_box_shadow(' .variations select', 'sh_v_s', 'h')
self::get_expand('bg', array(
self::get_color('.module .button', 'b_c_atc_btn', 'bg_c', 'background-color')