: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* Add To Cart Module Quantity Change
function tbp_cart_icon_module_quantity(){
let btn=this.closest('.tb_pro_add_to_cart');
btn=btn.getElementsByClassName('button')[0];
btn.setAttribute('data-quantity',parseInt(this.value));
function tbp_add_to_cart_module(el,type,isLazy){
if(Themify.is_builder_active){
const items = Themify.selectWithParent('single_add_to_cart_button',el);
for(let i=items.length-1;i>-1;--i){
items[i].classList.add('disabled');
function tbp_cart_icon_module(el,type,isLazy) {
if(isLazy===true && !el[0].classList.contains('module-cart-icon')){
const mods=Themify.selectWithParent('tbp_slide_cart',el);
for(let i=mods.length-1;i>-1;--i){
Themify.sideMenu(mods[i].previousElementSibling,{
close: '#' + mods[i].getElementsByClassName('tbp_cart_icon_close')[0].getAttribute('id')
// Show & Hide cart icon on add to cart event
const firstItem=mods[0].previousElementSibling;
Themify.body.on('added_to_cart', function (e) {
function tbp_search_form_module(el,type,isLazy) {
if (!el || (isLazy === true && ! el[0].classList.contains( 'module-search-form' )) ){
ajax_type = item.dataset['ajax'];
both:ajax_type==='dropdown',
el:'overlay'===ajax_type?item.getElementsByClassName('tbp_icon_search')[0]:item.querySelector('input[name="s"]'),
container:'overlay'===ajax_type?item.getElementsByClassName('search-lightbox-wrap')[0]:item,
post_type:item.dataset['postType']
Themify.body.on('change','.tb_pro_add_to_cart input',tbp_cart_icon_module_quantity)
.on('click', '.tbp_remove_from_cart_button', function (e) {// remove item ajax
this.classList.remove('tf_close');
this.classList.add('tf_loader');
Themify.on( 'builder_load_module_partial', function(el,type,isLazy){
tbp_add_to_cart_module(el,type,isLazy);
tbp_cart_icon_module(el,type,isLazy);
tbp_search_form_module(el,type,isLazy);
window.addEventListener('load', Run, {once:true, passive:true});