Overriding CustomerData/Cart.php removes Total from MiniCart Magento 2How to Override or Extend protected or parent function in Magento 2 using PluginOverriding protected function in Magento 2How to call rewards block phtml content into minicart section magento 2?Overriding MagentoCatalogModelLayer class not working in Magento 2Magento 2: Get Products in admin panel Using PluginNot able to remove shipping cost from grand total in Magento 2Magento2.2.2: Module override cause in Wysywig editor shows broken imageOverriding private method of Model file in Magento 2Unable to override account creation email templateGet Product info from afterAddProduct Plugin in magento 2
Am I legally required to provide a (GPL licensed) source code even after a project is abandoned?
Is a single radon daughter atom in air a solid?
LWC - Local Dev - How can I run the local server on HTTPS?
Do I have any obligations to my PhD supervisor's requests after I have graduated?
What happened to Steve's Shield in Iron Man 2?
Helping ease my back pain by studying 13 hours everyday , even weekends
Primes and SemiPrimes in Binary
Loss of power when I remove item from the outlet
Similarity score: Can Sklearn SVR predict values greater than 1 and less than 0?
Why does the Saturn V have standalone inter-stage rings?
I found a password with hashcat, but it doesn't work
Is it illegal to withhold someone's passport and green card in California?
DBCC checkdb on tempdb
Dates on degrees don’t make sense – will people care?
Is there any proof that high saturation and contrast makes a picture more appealing in social media?
Constitutionality of U.S. Democratic Presidential Candidate's Supreme Court Suggestion
Story about hunting giant lizards for hides on privately owned planet
`-` in tar xzf -
Why is it recommended to mix yogurt starter with a small amount of milk before adding to the entire batch?
Explain why a line can never intersect a plane in exactly two points.
Does the monk's Step of the Wind feature activate the benefit of the Mobile feat?
Is "Busen" just the area between the breasts?
Confusion over 220 and 230 volt outlets
Ruining the family name
Overriding CustomerData/Cart.php removes Total from MiniCart Magento 2
How to Override or Extend protected or parent function in Magento 2 using PluginOverriding protected function in Magento 2How to call rewards block phtml content into minicart section magento 2?Overriding MagentoCatalogModelLayer class not working in Magento 2Magento 2: Get Products in admin panel Using PluginNot able to remove shipping cost from grand total in Magento 2Magento2.2.2: Module override cause in Wysywig editor shows broken imageOverriding private method of Model file in Magento 2Unable to override account creation email templateGet Product info from afterAddProduct Plugin in magento 2
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have overridden
vendormagentomodule-checkoutCustomerDataCart.php
file in my custom plugin using di.xml using below code:
<preference for="MagentoCheckoutCustomerDataCart"
type="VendorPackageCustomerDataCart" />
It's working too. I can get SectionData defined in my custom Cart.php file in Minicart successfully.
but this removes Total from my Minicart which was working fine with default Cart.php.
Please suggest if i am doing something wrong in overriding file.
magento2 mini-cart overriding customer-data
add a comment |
I have overridden
vendormagentomodule-checkoutCustomerDataCart.php
file in my custom plugin using di.xml using below code:
<preference for="MagentoCheckoutCustomerDataCart"
type="VendorPackageCustomerDataCart" />
It's working too. I can get SectionData defined in my custom Cart.php file in Minicart successfully.
but this removes Total from my Minicart which was working fine with default Cart.php.
Please suggest if i am doing something wrong in overriding file.
magento2 mini-cart overriding customer-data
add a comment |
I have overridden
vendormagentomodule-checkoutCustomerDataCart.php
file in my custom plugin using di.xml using below code:
<preference for="MagentoCheckoutCustomerDataCart"
type="VendorPackageCustomerDataCart" />
It's working too. I can get SectionData defined in my custom Cart.php file in Minicart successfully.
but this removes Total from my Minicart which was working fine with default Cart.php.
Please suggest if i am doing something wrong in overriding file.
magento2 mini-cart overriding customer-data
I have overridden
vendormagentomodule-checkoutCustomerDataCart.php
file in my custom plugin using di.xml using below code:
<preference for="MagentoCheckoutCustomerDataCart"
type="VendorPackageCustomerDataCart" />
It's working too. I can get SectionData defined in my custom Cart.php file in Minicart successfully.
but this removes Total from my Minicart which was working fine with default Cart.php.
Please suggest if i am doing something wrong in overriding file.
magento2 mini-cart overriding customer-data
magento2 mini-cart overriding customer-data
asked Jun 12 at 12:58
KhushbuKhushbu
17313
17313
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I solved this issue by following method:
File: di.xml
<type name="MagentoCheckoutCustomerDataCart">
<plugin name="CustomMiniCart" type="VendorPackageCustomerDataCart" sortOrder="1"/>
</type>
File:VendorPackageCustomerDataCart.php
namespace VendorPackageCustomerData;
class Cart
public function afterGetSectionData(MagentoCheckoutCustomerDataCart $subject, $result)
$result['customdata1'] = $customvalue1;
$result['customdata2'] = $customvalue2;
return $result;
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f278122%2foverriding-customerdata-cart-php-removes-total-from-minicart-magento-2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I solved this issue by following method:
File: di.xml
<type name="MagentoCheckoutCustomerDataCart">
<plugin name="CustomMiniCart" type="VendorPackageCustomerDataCart" sortOrder="1"/>
</type>
File:VendorPackageCustomerDataCart.php
namespace VendorPackageCustomerData;
class Cart
public function afterGetSectionData(MagentoCheckoutCustomerDataCart $subject, $result)
$result['customdata1'] = $customvalue1;
$result['customdata2'] = $customvalue2;
return $result;
add a comment |
I solved this issue by following method:
File: di.xml
<type name="MagentoCheckoutCustomerDataCart">
<plugin name="CustomMiniCart" type="VendorPackageCustomerDataCart" sortOrder="1"/>
</type>
File:VendorPackageCustomerDataCart.php
namespace VendorPackageCustomerData;
class Cart
public function afterGetSectionData(MagentoCheckoutCustomerDataCart $subject, $result)
$result['customdata1'] = $customvalue1;
$result['customdata2'] = $customvalue2;
return $result;
add a comment |
I solved this issue by following method:
File: di.xml
<type name="MagentoCheckoutCustomerDataCart">
<plugin name="CustomMiniCart" type="VendorPackageCustomerDataCart" sortOrder="1"/>
</type>
File:VendorPackageCustomerDataCart.php
namespace VendorPackageCustomerData;
class Cart
public function afterGetSectionData(MagentoCheckoutCustomerDataCart $subject, $result)
$result['customdata1'] = $customvalue1;
$result['customdata2'] = $customvalue2;
return $result;
I solved this issue by following method:
File: di.xml
<type name="MagentoCheckoutCustomerDataCart">
<plugin name="CustomMiniCart" type="VendorPackageCustomerDataCart" sortOrder="1"/>
</type>
File:VendorPackageCustomerDataCart.php
namespace VendorPackageCustomerData;
class Cart
public function afterGetSectionData(MagentoCheckoutCustomerDataCart $subject, $result)
$result['customdata1'] = $customvalue1;
$result['customdata2'] = $customvalue2;
return $result;
answered Jun 13 at 4:50
KhushbuKhushbu
17313
17313
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f278122%2foverriding-customerdata-cart-php-removes-total-from-minicart-magento-2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown