New answers tagged

0

The current customers' reward points can be checked in the magento_reward table Reward points history (when they were added/ subtracted) in the magento_reward_history table Rule-2-points relation is found in magento_reward_salesrule Good luck!


0

I have the same issue on Magento version 2.4.1 Steps to reproduce: Create a cart price rule without coupon(With coupon didn't try, but I think will be the same result). Create order as guest user. After placing the order, register an account with user data witch were used in step 2. Go to admin panel to this order. Try to cancel it. The main problem in it. ...


1

Attribute Set Grid is from vendor\magento\module-catalog\view\adminhtml\layout\catalog_product_set_block.xml Just override this layout from your module and add the code below to add the attribute set id to the grid <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=&...


-2

I have done this using javascript in one of my projects. I have posted my code here. <div class="article-container"> <div class="content"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer ...


0

The buffer size options you have highlighted will resolve this error. Here is an example MAMP config for Magento https://gist.github.com/apiworks/bbb8ec03843e1926089055d634a2c4db Check your nginx configuration, in my nginx magento2 site configs (I am not using MAMP) these buffer options are always in the server section.


0

define([ 'uiComponent', 'jquery', 'Magento_Checkout/js/model/quote', 'ko', 'Magento_Checkout/js/model/cart/totals-processor/default', ], function (Component, $, quote, ko, totalsDefaultProvider) { 'use strict'; return Component.extend({ updateTaxValue:function(){ //Start Custom Changes// quote....


0

command: php bin/magento module:status Module_Name look in the database table: setup_module


0

Thank you all, I found my own solution in this post https://stackoverflow.com/questions/16733486/how-to-get-the-customer-group-binded-to-a-sale-rule-in-magento then my code will be $dataArray = $this->objectManager->create(Magento\CatalogRule\Model\Rule::class); $test = $dataArray->getCollection()->load(); foreach ($test as $value) { ...


0

Yes, you can check using following query. SELECT * FROM setup_module WHERE module='Learning_GreetingMessage'; +--------------------------+----------------+--------------+-------------------+ | module | schema_version | data_version | +--------------------------+----------------+--------------+-------------------+ | Learning_GreetingMessage |...


0

You can check the included modules with the help of the command: php bin/magento module:status Or you can look in the database table: setup_module


0

Another possible issue could be the missing modules. Try executing below (If your PHP version is 7.4) sudo apt-get install libapache2-mod-php7.4 sudo service apache2 restart


0

No need for a plugin to modify your model data, if you own the model In your Model Class, lets assume \Vendor\Module\Model\Friend You have a field in the collection nickname and you want to change the nickname to some text or append some text to the existing nick name, when you load and retrieve the collection So, just throw a getter method getNickname ...


0

I followed the below link and it helps me to add a new country Add new nation into nation's list in Magento 2.3.5


0

We have found the same problem, and after investigating about it we have found a temporary solution. Yes temporary because the attacker has used some way to inject it, so the real challenge is find where is the Hole in the server! In most of cases it's better starting from a scratch VPS, so it will be fresh and clean system! By the way this problem is ...


0

It was php version issue, magento 2.3.5-p1 requires 7.3 php version, in system it was 8.0. Setting php version 7.3, solves the error.


0

In my magento it was like this - https://prnt.sc/yop6an To remove first name and last name from my account , you should change the html address template For that please go to admin panel and go to below path Stores > COnfiguration > Customers > Customer Configuration > Address Templates Edit Html template and remove two variables {{{var ...


0

I feel the need to provide some clarification here, regarding the $uploader initialization using UploaderFactory. I was trying to achieve the same thing as OP, and Sunil's answer helped a lot, but I lost several hours being stuck on the value of 'fileId'. This answer -- as well as all of the other tutorials I followed -- indicates that the value is a ...


1

as you haven't mentioned where the array variable $_customerProductPrices is from, whether its from a Block or from a ViewModel or in a template (.phtml file). As well as its also not mentioned how do you get this , whether through a repository method or from a collection or any other approach Quick but Ugly lets assume that its in a template file in this ...


0

You could try using what the classvendor/magento/module-directory/Model/PriceCurrency.php has to offer with its format() method. Check how this is used inside vendor/magento/module-customer-balance/Block/Adminhtml/Sales/Order/Create/Payment.php class.


1

If You don't want to change existing Statuses, just add new. You should use DI for that with afterToOptionArray(\Magento\Sales\Model\Config\Source\Order\Status $subject, array $result). and inside just prepare and add new status to $result array. And of course return it. How To use DI? It's pretty simple. Just read https://devdocs.magento.com/guides/v2.4/...


0

Follow miss things in Dckap Restrict States Module registration.php in Dckap\CustomerAddresses\ <?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, 'Dckap_CustomerAddresses', __DIR__ ); ?> module.xml in Dckap\CustomerAddresses\etc\ <?xml version="1.0"?>...


1

you can try like this: <?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $currentProduct = $objectManager->get('Magento\Framework\Registry')->registry('current_product');//get current product information $id = $currentProduct->getId(); $product = $objectManager->create('Magento\...


0

So in my case, i was missing the depended method from the parent file, Like my function getPrice() was using other two methods i also have to copy them into my custom model file and its working fine. Hope so this will help someone else as well.


1

You cannot override private functions. Also, you should only use preference as a last resort, try instead to use plugins to change the behaviour. Please note plugins also cannot be used on private methods, so try looking for a public method that invokes the private method you are trying to override, and use an after or around public on that.


0

addStatusHistoryComment is deprecated, use addCommentToStatusHistory instead. Here is the sample code: protected $orderRepository; public function __construct( ... \Magento\Sales\Model\OrderRepository $orderRepository ... ) { $this->orderRepository = $orderRepository; } public function saveOrder($orderId) { $order = $this->...


Top 50 recent answers are included