对象已移动

可在此处找到该文档 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
4 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

Lazarus Group hackers increase open-source weaponisation
Softwares

Lazarus Group hackers increase open-source weaponisation

by admin
July 30, 2025
Best AI Agents Development Companies in 2025
Softwares

Best AI Agents Development Companies in 2025

by admin
July 28, 2025
Minor update(3) for Vivaldi Android Browser 7.5
Softwares

Minor update(3) for Vivaldi Android Browser 7.5

by admin
July 27, 2025
User Guide For 360 Degree Product Image For Wix
Softwares

User Guide For 360 Degree Product Image For Wix

by admin
July 24, 2025
New open-source tool makes complex data understandable
Softwares

New open-source tool makes complex data understandable

by admin
July 25, 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
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
How well did you know Ozzy? Take this quiz – National

How well did you know Ozzy? Take this quiz – National

July 28, 2025
I Tried Calocurb For 90 Days. Here’s My Review.

I Tried Calocurb For 90 Days. Here’s My Review.

January 8, 2025
Why unFTP, how to run, embed or extend with Rust

Why unFTP, how to run, embed or extend with Rust

June 22, 2021
Nothing helped his eczema, so this S’porean invented his own fix

Nothing helped his eczema, so this S’porean invented his own fix

July 25, 2025
40+ Best Free Photoshop Actions & Effects in 2025 — Speckyboy

40+ Best Free Photoshop Actions & Effects in 2025 — Speckyboy

July 26, 2025
Spotify Stock Dips On Q2 Earnings Miss, Focus On Ads Business

Spotify Stock Dips On Q2 Earnings Miss, Focus On Ads Business

July 29, 2025
Ultra-Mini Qi2 Magnetic Power Bank with Kickstand from Baseus is now available on Amazon

Ultra-Mini Qi2 Magnetic Power Bank with Kickstand from Baseus is now available on Amazon

July 30, 2025
36 Rappers Who Released Projects While Locked Up

36 Rappers Who Released Projects While Locked Up

July 30, 2025
Ultra-Mini Qi2 Magnetic Power Bank with Kickstand from Baseus is now available on Amazon

Ultra-Mini Qi2 Magnetic Power Bank with Kickstand from Baseus is now available on Amazon

July 30, 2025
Family, Friends & Fans Gather for Ozzy Osbourne’s Cortege Travels

Family, Friends & Fans Gather for Ozzy Osbourne’s Cortege Travels

July 30, 2025
Lazarus Group hackers increase open-source weaponisation

Lazarus Group hackers increase open-source weaponisation

July 30, 2025
Falcon Finance Secures $10 Million Initial Investment from World Liberty Financial to Advance Cross-Platform Stablecoin Development

Falcon Finance Secures $10 Million Initial Investment from World Liberty Financial to Advance Cross-Platform Stablecoin Development

July 30, 2025
10 Hulu Miniseries That Are Absolutely Flawless (#1 Is The Best You’ve Never Seen)

10 Hulu Miniseries That Are Absolutely Flawless (#1 Is The Best You’ve Never Seen)

July 30, 2025
Love Island USA’s JaNa Craig and Kenny Rodriguez Split: What We Know

Love Island USA’s JaNa Craig and Kenny Rodriguez Split: What We Know

July 30, 2025
What to post on LinkedIn: 30 ideas plus examples

What to post on LinkedIn: 30 ideas plus examples

July 30, 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

  • 36 Rappers Who Released Projects While Locked Up
  • Ultra-Mini Qi2 Magnetic Power Bank with Kickstand from Baseus is now available on Amazon
  • Family, Friends & Fans Gather for Ozzy Osbourne’s Cortege Travels
  • 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