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

User Guide For UnoPim PDF Generator
Softwares

User Guide For UnoPim PDF Generator

by admin
May 31, 2025
Infragistics Ultimate 25.1 includes updates across several of its UI toolkit components
Softwares

Infragistics Ultimate 25.1 includes updates across several of its UI toolkit components

by admin
May 29, 2025
Qt bridges the language barrier gap
Softwares

Qt bridges the language barrier gap

by admin
May 28, 2025
Find the Best Rust Software Developers for Your Project
Softwares

Find the Best Rust Software Developers for Your Project

by admin
May 26, 2025
Verification framework uncovers safety lapses in open-source self-driving system
Softwares

Verification framework uncovers safety lapses in open-source self-driving system

by admin
May 23, 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
Anant Ambani wedding: Celebs, wealthy elite attend lavish billionaire festivities – National

Anant Ambani wedding: Celebs, wealthy elite attend lavish billionaire festivities – National

March 1, 2024
10 really good gadgets that cost less than $100 – TechCrunch

10 really good gadgets that cost less than $100 – TechCrunch

December 17, 2021
Deployment Diagrams Explained in Detail, With Examples

Deployment Diagrams Explained in Detail, With Examples

August 11, 2021
Every Kathryn Hahn Film Performance, Ranked

Every Kathryn Hahn Film Performance, Ranked

December 24, 2022
Best Coding Practices For Rest API Design

Django Form | Data Types and Fields

June 9, 2023
Advancement in predicting software vulnerabilities

Advancement in predicting software vulnerabilities

May 21, 2022
Most Useful Gadgets in 2021 – Nogentech.org

Most Useful Gadgets in 2021 – Nogentech.org

July 29, 2021
4 cryptocurrency companies in S’pore that are still standing strong

4 cryptocurrency companies in S’pore that are still standing strong

May 13, 2021
‘The Black Phone 2’ Dials In Some Ominous Teasers

‘The Black Phone 2’ Dials In Some Ominous Teasers

May 31, 2025
Nicola Peltz Beckham shares cryptic Instagram story amid ongoing rumours of a Beckham family feud

Nicola Peltz Beckham shares cryptic Instagram story amid ongoing rumours of a Beckham family feud

May 31, 2025
THE PHOENICIAN SCHEME Hilariously Quriky and One of Wes Anderson’s Best Movies — GeekTyrant

THE PHOENICIAN SCHEME Hilariously Quriky and One of Wes Anderson’s Best Movies — GeekTyrant

May 31, 2025
Mama June and Daughters Address Family Feud, Money Dispute and Raising Chickadee’s Kid

Mama June and Daughters Address Family Feud, Money Dispute and Raising Chickadee’s Kid

May 31, 2025
Insane Clown Posse Name Favorite Rock Bands, Best Nu-Metal Rapper

Insane Clown Posse Name Favorite Rock Bands, Best Nu-Metal Rapper

May 31, 2025
The Clipse’s ‘Ace Trumpets’: The 12 Best Lines

The Clipse’s ‘Ace Trumpets’: The 12 Best Lines

May 30, 2025
Google Maps falsely told drivers in Germany that roads across the country were closed

Google Maps falsely told drivers in Germany that roads across the country were closed

May 30, 2025
Indigenous Sex Worker Drama Seventeen Begins Production, Unveils Cast

Indigenous Sex Worker Drama Seventeen Begins Production, Unveils Cast

May 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

  • ‘The Black Phone 2’ Dials In Some Ominous Teasers
  • Nicola Peltz Beckham shares cryptic Instagram story amid ongoing rumours of a Beckham family feud
  • THE PHOENICIAN SCHEME Hilariously Quriky and One of Wes Anderson’s Best Movies — GeekTyrant
  • 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.

slot website