Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 77899

General questions about Magento 2, not specific to a minor version. Use this tag to distinguish from Magento 1. If you have issues with a specific version, please use the appropriate 'Magento-2.x' tag instead. Functionalities between Magento 2 minor versions might differ.

1 vote
3 answers
5k views

How To Get The Tax Rate From A Product

I am looking to get the tax rate value from a product (not quote item) in a plugin, which fires on the beforeAddProduct() method. Currently I have the following in my plugin code: $taxClassId = $produ …
1 vote
1 answer
1k views

Magepack Bundle Console Error On Magento 2.4.4

After upgrading from 2.4.3-p1 to 2.4.4, the following error shows up in the console: Uncaught Error: Mismatched anonymous define() module: function( $ ) { I've traced the error back to the generated / …
0 votes
1 answer
336 views

Module to remove inactive customers

Can anyone recommend a good free or paid module which will fit the following scenario please? A customer has created an account but has never placed an order, so this account must be removed after 5 y …
1 vote
Accepted

Magento 2: Disable Welcome Email Using preference

$storeId = null, $sendemailStoreId = null ): void { return; } } Which essentially inverts the original functionality of the method linked here (https://github.com/magento/magento2
SNAFU's user avatar
  • 306
0 votes
1 answer
348 views

The best ways to practice Magento 2 when not in work

Any recommendations for how to practice Magento 2 when not working? i.e. it's easier when working as you're presented with real life task, issues, clients etc. but when practicing at home, I'm just no …
2 votes
1 answer
537 views

Refund part order but don't refund shipping

at the moment I have a function which will refund the invoice on an order. However the shipping is currently also being refunded, which I don't want. Is there a way to set the shipping to zero on an i …
3 votes

Refund part order but don't refund shipping

Ok, I figured this one out :D So basically when we run the `execute` method on the refundInvoice object, we need to send some arguments with it also. We can set those arguments using the Magento\Sal …
SNAFU's user avatar
  • 306
0 votes
1 answer
655 views

Get Latest Entry For Duplicate Rows In Collection

I currently have a logs table which has the following rows which use the same order_id: log_id order_id user action 2410 1001318004 test1 Declined 2409 1001318004 test1 Declined Inside m …
1 vote
Accepted

Get Latest Entry For Duplicate Rows In Collection

Ok, so after a long time of troubleshooting this, I have finally resolved it. So here is the solution for anyone else who encounters a similar problem. The initial method: protected function _initSele …
SNAFU's user avatar
  • 306
0 votes
1 answer
920 views

Custom Order API Extension Attribute Not Saving

I am trying to create a new extension attribute for the order API but I keep getting "does not have accessor method getRepeatOrder" error when I call the API endpoint. This is how I currently have thi …
1 vote

Custom Order API Extension Attribute Not Saving

Ok I figured this one out. So it turns out instead of setting the payload like this: { "entity":{ "entity_id":1557418, "repeat_order":"true" } } I should have set it like this because it' …
SNAFU's user avatar
  • 306
0 votes
0 answers
28 views

Best way to do this?

I've been racking my brains for a long time trying to think of the best most efficient way to solve the following problem. Basically I have a set of questions which I'm looping through in the followin …
0 votes
1 answer
864 views

Remove VAT from products which include Tax in catalog price

I am looking for a way to remove VAT from a product when it's added to the cart, for cases where the customer is entitled to VAT relief. Up to now, I have tried the following suggestion mentioned her …
3 votes
Accepted

Remove VAT from products which include Tax in catalog price

Ok I figured this one out and posting in case I forget in future, but also to assist with anyone else who was looking for a solution to this problem :) So I basically resolved this using a custom tota …
SNAFU's user avatar
  • 306
1 vote
1 answer
1k views

How to refund only part of an order programmatically

I am looking for a way to programmatically refund part of an order within a custom module. I have been following this blog post (https://www.rakeshjesadiya.com/create-creditmemo-for-order-item-in-mage …

15 30 50 per page