对象已移动

可在此处找到该文档 Display custom block on checkout page & cart summary – New Self New Life
New Self New Life
No Result
View All Result
  • Home
  • Entertainment
  • Celebrity
  • Cinema
  • Music
  • Digital Lifestyle
  • Social Media
  • Softwares
  • Devices
  • Home
  • Entertainment
  • Celebrity
  • Cinema
  • Music
  • Digital Lifestyle
  • Social Media
  • Softwares
  • Devices
New Self New Life
No Result
View All Result
Home Softwares

Display custom block on checkout page & cart summary

by admin
3 years ago
in Softwares
Display custom block on checkout page & cart summary
Share on FacebookShare on Twitter


On this weblog we’re going to discover ways to present customized block in cart abstract on checkout web page at entrance finish in prestashop.

Typically we have to present some extra info or we wish to show some customized block on the cart web page or checkout web page on the entrance finish. So, we are able to obtain the identical by following steps.

Let’s Do A Stay Take a look at..!!!

Firstly, We are able to make modifications in immediately on core prestashop tpl file to attain your rquirement. You’ll be able to immediately add textual content or HTML in your desired location. File paths are talked about under.
File Path:
/themes/traditional/templates/checkout/_partials/cart-summary.tpl
/themes/traditional/templates/checkout/_partials/cart-detailed-totals.tpl

By utilizing prestashop hooks:

We are able to obtain this by registering two hooks ‘displayCheckoutSummaryTop‘ and ‘displayCheckoutSubtotalDetails‘ in customized module. You can even create a separate small module to handle issues separatly.

Looking for an skilled
Prestashop Firm ?
Learn Extra


Cart Web page :

$this->registerHook(‘displayCheckoutSubtotalDetails’); // to point out customized block on cart abstract

After that, We have to create a operate to name the tpl & assign variable to get desired content material.

/**
* Perform to point out free delivery alert on cart web page
*/
public operate hookDisplayCheckoutSubtotalDetails()
{
    if ('cart' == $this->context->controller->php_self) {
        $this->context->smarty->assign(
            array(
                'message' => $this->l('Add $226.5 extra to avail free delivery.'),
            )
        );
        return $this->fetch(
            'module:MODULE_NAME/views/templates/hook/TPL_FILE_NAME.tpl'
        );
    }
}

Now create a tpl file on this path “/views/templates/hook” to name in above operate & right here is the outcome under. You’ll be able to handle the hook positions based on your want from backoffice.

screenshot_prestashopdemo.webkul.com_8569_2022.01.15_00_24_25

Checkout Web page:

$this->registerHook(‘displayCheckoutSummaryTop’); // to point out customized block on checkout subtotal part

After that, We have to create a operate associated to this registered hook.

/**
* Perform to point out free delivery alert on checkout web page
*/
public operate hookDisplayCheckoutSummaryTop()
{
    if ('order' == $this->context->controller->php_self) {
        $this->context->smarty->assign(
            array(
                'message' => $this->l('Add $226.5 extra to avail free delivery.'),
            )
        );
        return $this->fetch(
            'module:MODULE_NAME/views/templates/hook/TPL_FILE_NAME.tpl'
        );
    }
}

Right here is the outcome under.

screenshot-prestashopdemo.webkul.com_8474-2022.01.15-00_21_19

Observe:

It is a primary instance wherein we reveals just one customized area. You’ll be able to comply with identical for the a number of columns/fields.

Additionally, you possibly can discover our PrestaShop Improvement Companies and a wide range of high quality PrestaShop Modules.

For any doubt contact us at [email protected]

author-thumb

Sunny Kumar
2 Badges

15 January 2022



Source link

Tags: blockCartcheckoutCustomDisplaypagesummary
Previous Post

Review of Smartsheet Project Management

Next Post

Jonah Hill Wants to Make ‘Old Folks Home’ ‘Superbad 2’ When He Is 80 Years Old : entertainment

Related Posts

Avoid these common platform engineering mistakes
Softwares

Avoid these common platform engineering mistakes

by admin
July 4, 2025
Meta slams ‘incorrect and unlawful’ EU DMA ruling
Softwares

Meta slams ‘incorrect and unlawful’ EU DMA ruling

by admin
July 3, 2025
Best Practices, Tools, xUnit, and NUnit Framework
Softwares

Best Practices, Tools, xUnit, and NUnit Framework

by admin
July 1, 2025
Start up crash fix – Vivaldi iOS Browser snapshot 3737.4
Softwares

Start up crash fix – Vivaldi iOS Browser snapshot 3737.4

by admin
June 30, 2025
Windows’ infamous ‘blue screen of death’ will soon turn black
Softwares

Windows’ infamous ‘blue screen of death’ will soon turn black

by admin
June 28, 2025
Next Post
Jonah Hill Wants to Make ‘Old Folks Home’ ‘Superbad 2’ When He Is 80 Years Old : entertainment

Jonah Hill Wants to Make ‘Old Folks Home’ ‘Superbad 2’ When He Is 80 Years Old : entertainment

Is Britney Spears Calling A Ceasefire With Jamie Lynn? See The Latest Message To Her Sister!

Is Britney Spears Calling A Ceasefire With Jamie Lynn? See The Latest Message To Her Sister!

  • Trending
  • Comments
  • Latest
Kanye West entry visa revoked by Australia after ‘Heil Hitler’ song release – National

Kanye West entry visa revoked by Australia after ‘Heil Hitler’ song release – National

July 3, 2025
‘America is back’: Foo Fighters show hits 100% capacity at Madison Square Garden – National

‘America is back’: Foo Fighters show hits 100% capacity at Madison Square Garden – National

June 22, 2021
Indiana Evans: What happened to the H2O Australian actress Indiana Evans and what is she doing now? | Explainer

Indiana Evans: What happened to the H2O Australian actress Indiana Evans and what is she doing now? | Explainer

December 7, 2024
18 Best Political Series on Netflix, Ranked

18 Best Political Series on Netflix, Ranked

March 25, 2025
Jane Withers, child actor and commercial star, dies at 95 – National

Jane Withers, child actor and commercial star, dies at 95 – National

August 10, 2021
Games teach kids climate action

Games teach kids climate action

January 23, 2024
How to integrate Odoo with ReactJs frontend

How to integrate Odoo with ReactJs frontend

October 7, 2024
All the glamorous celebrity looks from the Jeff Bezos, Lauren Sánchez wedding – National

All the glamorous celebrity looks from the Jeff Bezos, Lauren Sánchez wedding – National

June 28, 2025
Latest Sales Data Reveal Clear Winners And Losers in a Messy EV Market

Latest Sales Data Reveal Clear Winners And Losers in a Messy EV Market

July 5, 2025
Critics And Fans Disagree On Netflix’s Controversial Fantasy Show With Near-Perfect RT Score

Critics And Fans Disagree On Netflix’s Controversial Fantasy Show With Near-Perfect RT Score

July 5, 2025
Nip/Tuck Star Julian McMahon Dead at 56 After Private Cancer Battle

Nip/Tuck Star Julian McMahon Dead at 56 After Private Cancer Battle

July 5, 2025
Alesso and Sentinel Channel Raw Emotion on Thunderous New Single "Freedom"

Alesso and Sentinel Channel Raw Emotion on Thunderous New Single "Freedom"

July 5, 2025
The best early deals live before the sale, plus everything else you need to know

The best early deals live before the sale, plus everything else you need to know

July 4, 2025
Influencer Alix Earle Reveals The ONE Cosmetic Surgery She Regrets! (You'll Never Guess!)

Influencer Alix Earle Reveals The ONE Cosmetic Surgery She Regrets! (You'll Never Guess!)

July 5, 2025
The Rest Is Bulls*!t’ YouTube To Feature Prince Harry

The Rest Is Bulls*!t’ YouTube To Feature Prince Harry

July 4, 2025
Top 50 American Rock Songs

Top 50 American Rock Songs

July 4, 2025
New Self New Life

Your source for entertainment news, celebrities, celebrity news, and Music, Cinema, Digital Lifestyle and Social Media and More !

Categories

  • Celebrity
  • Cinema
  • Devices
  • Digital Lifestyle
  • Entertainment
  • Music
  • Social Media
  • Softwares
  • Uncategorized

Recent Posts

  • Latest Sales Data Reveal Clear Winners And Losers in a Messy EV Market
  • Critics And Fans Disagree On Netflix’s Controversial Fantasy Show With Near-Perfect RT Score
  • Nip/Tuck Star Julian McMahon Dead at 56 After Private Cancer Battle
  • Home
  • Disclaimer
  • DMCA
  • Privacy Policy
  • Cookie Privacy Policy
  • Terms and Conditions
  • Contact us

Copyright © 2021 New Self New Life.
New Self New Life is not responsible for the content of external sites. slotsfree  creator solana token

No Result
View All Result
  • Home
  • Entertainment
  • Celebrity
  • Cinema
  • Music
  • Digital Lifestyle
  • Social Media
  • Softwares
  • Devices

Copyright © 2021 New Self New Life.
New Self New Life is not responsible for the content of external sites.

New Self New Life