magento2 – Duplicate url issue when removing products from category in magento 2.3.3

When i try to remove products from category https://prnt.sc/vl7rt3, i get duplicate url error.
https://prnt.sc/vkscz9.

I know how to resolve it. but need to understand when a product is removed from a subcategory – how is it generating a duplicate url?

Can any one please explain me this?

magento2 – main.CRITICAL: The stock item with the “37520” ID wasn’t found. Verify the ID and try again. System.log – M2 2.3.3

Error While Saving The Products : The stock item with the “37520” ID wasn’t found. Verify the ID and try again.

Solution: In my case. This error comes after installing Magento2Facebook Pixel Extension. In which module fetching Inventory using StockItemRepository. This only works when product id and item id same in database(in my database it’s not same).

1,) first find the file containing StockItemRepository Code in Module which cousing this issue. Download the file for backup.
2,) Now change every line of code containing StockItemRepository to comment.

3,) Open any product in backend and try to save it.
you will find some error with row number details which causing issue. You need to comment that lines also. Refresh the product page and save product again. Your product will save or you will get another error in another php row. Comment that line also and repeat this step again and again untill your product got saved.

Note: This solution will disable the inventory fetch function of the module. If anyone have alternative method to resolve StockItemRepository issue. Please comment

Solution to resolve this issue.

magento2.3 – assign only one and leaf category per product in magento 2.3.3

I want that the only category checkbox selectable should be the leaf category that is the category checkbox without children in the current branch and only one category checkbox per product can be selected.
The pseudo code is:

if category has children then input checkbox tag is disabled
if at least one category is selected then disable all other checkboxes

I can’t find where to edit the category checkboxes code.
They are the checlboxes shown in the product edit page or new product page.

magento2 – Magento 2.3.3 Tax question

I know this is a common issue, but cant seem to find a proper answer anywhere.
I am running a Magento 2.3.3 shop and have my product imported through a plugin and these are imported excluding tax (i cannot change this, my industry suppliers work on excluding tax and this is how the prices are imported).
No matter what tax settings i use the inc VAT prices are always wrong when added to the cart.
For example, i have a product that sells for £8 inc VAT, so the ex VAT price set in the catalog is £6.67. The catalog and product pages display this correct at £8, but when a quantity of 2 is added to that cart it shows at £8.01 each.
I had an order yesterday for:
2 x £8
2 x 17 (these show as £17.01 in the cart)
£5 delivery

Magento works this out at £55.02, not £55. Before tax it displays as £45.85, not £45.83 like it should be.

No customers have yet questioned it, but it is frustrating and only a matter of time until somebody does.

My current tax settings are:
Tax Calculation Method Based On: Total (Have tried unit and row and i would prefer unit)
Catalog Prices: Excluding Tax (has to be this way)
Shipping Prices: Excluding Tax

Discounts are a whole other ball game and dont seem to be ale to do calculate discount after and including tax but this is not my worry for now.

I would like to figure out how i can display, in this example the prices correct with a total of £55 inc VAT. I know this is a rounding issue but dont know how to solve it. All prices are imported at 2 decimal places.

Thanks

multistore – Magento 2.3.3 Newbie – How To Setup Multiple Stores in Multi-Domain?

I’m sorry if this has been asked/answered in a different way of wording it. My apologies.

I have, what seems to be an EXTREMELY simple problem that – no matter how I search it – seems to come up with different solutions. Again, please excuse my ignorance of the solution.

BACKGROUND:
The only reason I switched to Magento is because of Multi-Domain support. I currently have a site up that houses over 400,000 SKUs and I want to be able to move those over to one backend and serve different descriptions/prices on each domain. I am hosted currently on Cloudways AWS server and have the DNS pointing to the correct IP addresses as verified by ‘whatsmydns.com’.

PROBLEM:

When navigating to ‘PCS.COM’ I get ‘PCS.COM’ to appear as ‘PCS.COM/DEFAULT’
When navigating to ‘CRESCOM.COM’ I get ‘PCS.COM’ to appear as ‘PCS.COM/DEFAULT’
When navigating to ‘RRESCOM.COM’ I get ‘PCS.COM’ to appear as ‘PCS.COM/DEFAULT’

Id like each domain to point to the correct domain…

I was given instruction from Cloudways that says the following:

1- change the webroot to /pub
2- Fetch the mage run code and mage run type of your stores.
3- Verify the domains in the store-> configurations -> web. Every store should have its own domain, not using the default value.
4- Add the following rules inside the /pub/index.php before $params = $_SERVER;

The code that was provided says:

switch ($_SERVER('HTTP_HOST')) {

case 'abc.com':
                $mageRunCode = 'abc_base';
                $mageRunType = 'website';
                break;

        case 'xyz.com':
                $mageRunCode = 'xyz_base';
                $mageRunType = 'website';
                break;


        default:
                $mageRunCode = 'base';
                $mageRunType = 'website';
                break;
                        }

TRIED:

  • Updating the pub/index.php file to the recommended settings.
  • Setting up all Stores > Config > Web settings to the correct values
  • Deleting Server & Reinstalling Magento 2.3.3
  • Researching to the fullest extent I can. No matter where I look there are different ways to redirect traffic to the correct domain.

FRUSTRATED:
I don’t know why/what/how to manage these redirections work. It seems like it should be a simple deal to do but I am at a loss – any help would be appreciated.

ADDITIONAL QUESTIONS:

  • In regards to $mageRunCode – I don’t know what code to put in. The Website, Store, or StoreView?
  • In regards to $mageRunType – I don’t know what code to put in. Store or Store View…..Or Web Site?

FURTHERMORE:
I’ve seen ‘solutions’ that mention editing the .htaccess file but from my research this would not be optimal because an update to M2 MAY edit that file to make it useless. True?

THANK YOU:
I just want to ‘Thank You’ for you time, assistance, and patience with me with this issue. For you developers out there I have nothing but respect. //// I just don’t know (YET) how to do this operation.
Thank You..Thank You..Thank You.

magento2.3 – magento 2.3.3 konckout translation doesn’t work

Hello I have the official stripe module for magento 2 which is not trasnlated correctly.
This is the piece of code:

    <span><!-- ko i18n: 'Use a new card'--><!-- /ko --></span>

I created the csv file into the i18n directory but the text is not translated.
I take a look into the js-translation.json file and the string it is not there.
If I manually put the string into that file it is translated. It seem that the process to insert the string into that file doesn’t work.

magento2 – Magento 2 EE (2.3.3) Gift card balance: Gift card Balance should be retained when the user cancels the transaction, Currently, it shows 0

Actual bug:
Gift card balance: Gift card Balance should be retained when the user cancels the transaction, Currently, it shows 0. [Eg. The order amount is 100 KWD and applied GV has 20 KWD then after the transaction gets canceled by canceling or clicking the browser back, the Gift card amount shows as 0.

Anyone?

Thanks