对象已移动

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

Minor update(4) for Vivaldi Android Browser 7.4
Softwares

Minor update(4) for Vivaldi Android Browser 7.4

by admin
June 21, 2025
10+ Best Free Portfolio & Lookbook Templates for InDesign in 2025 — Speckyboy
Softwares

10+ Best Free Portfolio & Lookbook Templates for InDesign in 2025 — Speckyboy

by admin
June 20, 2025
User Guide For CS-Cart Product Search By Barcode
Softwares

User Guide For CS-Cart Product Search By Barcode

by admin
June 18, 2025
Open Talent platforms emerging to match skilled workers to needs, study finds
Softwares

Open Talent platforms emerging to match skilled workers to needs, study finds

by admin
June 16, 2025
New tool could help homeowners weather flood risks, lower insurance costs
Softwares

New tool could help homeowners weather flood risks, lower insurance costs

by admin
June 19, 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
8BitDo Retro Mechanical Keyboard C64 Review

8BitDo Retro Mechanical Keyboard C64 Review

March 24, 2025
The Best Madras Shirt Brands For Men: Summer 2021 Edition

The Best Madras Shirt Brands For Men: Summer 2021 Edition

July 20, 2021
SOG and Leatherman EDC, Dyson Lightcycle Morph lamp, COTRE 2-way radios, and more – Weekly roundup

SOG and Leatherman EDC, Dyson Lightcycle Morph lamp, COTRE 2-way radios, and more – Weekly roundup

May 16, 2021
Guide for Bagisto Quick Commerce

Guide for Bagisto Quick Commerce

October 16, 2024
Bones: All Of Brennan’s Interns, Ranked

Bones: All Of Brennan’s Interns, Ranked

June 15, 2021
POORSTACY “Knife Party” video featuring Oli Sykes

POORSTACY “Knife Party” video featuring Oli Sykes

January 27, 2022
What Are the Best User Provisioning Practices for SaaS Apps

What Are the Best User Provisioning Practices for SaaS Apps

September 9, 2022
List of Essential Gadgets You Can’t Live Without

List of Essential Gadgets You Can’t Live Without

November 7, 2023
What We Know So Far About the Supposed ‘Mother of All Data Breaches’

What We Know So Far About the Supposed ‘Mother of All Data Breaches’

June 21, 2025
Go Through Justin Timberlake and Jessica Biel’s Sweet Family Photos

Go Through Justin Timberlake and Jessica Biel’s Sweet Family Photos

June 21, 2025
Secret royal swimming pools – including Princess Kate and Prince William’s heatwave haven

Secret royal swimming pools – including Princess Kate and Prince William’s heatwave haven

June 21, 2025
Who Is Yvie Oddly’s Husband? Doug Illsley’s Relationship History

Who Is Yvie Oddly’s Husband? Doug Illsley’s Relationship History

June 21, 2025
Social Platforms Explore Age Verification Options to Comply With Teen Access Regulations

Social Platforms Explore Age Verification Options to Comply With Teen Access Regulations

June 21, 2025
From Rave To Rock, L’Eclair Conjure Magic On ‘Cloud Drifter’

From Rave To Rock, L’Eclair Conjure Magic On ‘Cloud Drifter’

June 21, 2025
Minor update(4) for Vivaldi Android Browser 7.4

Minor update(4) for Vivaldi Android Browser 7.4

June 21, 2025
Jim Jones Rejects Notion That His Career Is Comparable to Nas’

Jim Jones Rejects Notion That His Career Is Comparable to Nas’

June 20, 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

  • What We Know So Far About the Supposed ‘Mother of All Data Breaches’
  • Go Through Justin Timberlake and Jessica Biel’s Sweet Family Photos
  • Secret royal swimming pools – including Princess Kate and Prince William’s heatwave haven
  • 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