Home / Prestashop Module Tutorials / Ap Page Builder / Turn off other module in ap page builder landing page

Turn off other module in ap page builder landing page

Hi

This guide is only appy for appagebuilder when you use this module with other page builder module: jscomposer …

When you want to turn off other module in landing page of page builder, only want to show logo + cart.
1. create new profile in ap pagebuilder ( not active it is home page in pc, mobile, tablet)

2. get field “” in profile you have just create

example: i create new profile and i get it is

3. access /classes/Hook.php

find the code:

public static function coreRenderWidget($module, $hook_name, $params)
{

replace it to

public static function coreRenderWidget($module, $hook_name, $params)
{
$string_url = “landingpage1”;
$hook_list = array(“displayMenu”, “displayTopContainerFull”, “displayTopContainer”, “displayFooterBefore” , “displayFooter”, “displayFooterAfter”, “displayHome”);

$urlCurrent = $_SERVER[‘REQUEST_URI’];
if(strpos($urlCurrent.’html’, $string_url)) {
if(in_array($hook_name, $hook_list) && $module->name !== “appagebuilder”) {
return ”;
}
}

remember $string_url should = “” you have just create.

if you have more edit code

if(strpos($urlCurrent.’html’, $string_url)) {

to

if(strpos($urlCurrent.’html’, $string_url) || strpos($urlCurrent.’html’, “string example2”) || strpos($urlCurrent.’html’, “string example3”)) {

4. if you are using jscomposer

access this file:

/modules/jscomposer/jscomposer.php

find the code

public function __call($function, $args)
{

edit to

public function __call($function, $args)
{

$string_url = “landingpage1″;
$urlCurrent = $_SERVER[‘REQUEST_URI’];
if(strpos($urlCurrent.’html’, $string_url)) {
return ”;
}

About Leo Theme

Check Also

Leotheme Black Friday 2022

Prestashop Theme and Module Black Friday and Cyber Monday Sales Leotheme 2022 30% Off

Prestashop Leotheme Black Friday 2022 Promotion! Dear valued customers, Black Friday and Cyber Monday Sales …

Leave a Reply