magento2 – Manually linking the product to categories

Is there a way to easily link products to categories in the database?
I did this with the API, but this is very slow and sometimes can not handle hundreds of categories for a product.

So I deleted them and recreated them catalog_category_product Table with a local script and uploaded it.
But then the rewriting of the URL seems to be confused.

Did I miss something?
Can I re-execute the Url rewrite process or should I manually edit / create other tables as well?

magento2 – Magento 2 limits the maximum length in the Quantity field

What you are describing is a limitation of the HTML 5 element, not Magento or your process. This is indeed the place you would need to change, and when I perform the editing you are describing, it will appear on my front end when I look at the source code. The problem you are describing is that the input type "number" ignores the maximum length.

There are solutions to the regular stack overflow in this thread. I would not recommend changing the field to text (although this would work), as it will affect the mobile experience. This link describes some simple JavaScript validation techniques.

magento2 – Magento 2: Custom command

I have a custom command in my module. However, when I try to insert my custom class into this command, the module can not be installed.

I've followed this tutorial –

This is my helper class:

class MyClass extends MagentoFrameworkAppHelperAbstractHelper{

    const KEY_STORE_ID = 'store-id';

    protected $state;
    protected $data;

    public function __construct(
        Context $context,
        State $state,
        VendorModuleCronAnotherClass $anotherClass
        $this->state = $state;
        $this->anotherClass = $anotherClass;

    public function setData(Input $input){
        $this->data = $input;
        return $this;

    public function execute(){

        $storeId = $this->data->getOption(self::KEY_STORE_ID);


When I try to install the module, I get the error message SQLSTATE 42S02: Table does not exist.
If I remove the command from di.xml, setup: upgrade will work fine.

Many thanks

magento2 – Magento 2 – Indexer error after data migration magento to 2.3.2

I'm trying to migrate data to Magento 2 using the data migration tool. The migration works fine but the index or crash during the catalog_product_price index fails with the error:

       SQLSTATE(42000): Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND dl.store_id = 0
     INNER JOIN `downloadable_link` AS `dll` ON dll.product_id =' at line 2, query was: 
INSERT INTO `catalog_product_index_price_downlod_temp` SELECT `i`.`entity_id`, `i`.`customer_group_id`, `i`.`website_id`, MIN(IFNULL(dlpw.price_id, dlpd.price)) AS `min_price`, SUM(IFNULL(dlpw.price_id, dlpd.price)) AS `max_price` FROM `catalog_product_index_price_temp` AS `i`
     INNER JOIN `catalog_product_entity` AS `dl` ON dl.entity_id = i.entity_id AND dl.attribute_id =  AND dl.store_id = 0
     INNER JOIN `downloadable_link` AS `dll` ON dll.product_id = i.entity_id
     INNER JOIN `downloadable_link_price` AS `dlpd` ON dll.link_id = dlpd.link_id AND dlpd.website_id = 0
     LEFT JOIN `downloadable_link_price` AS `dlpw` ON dlpd.link_id = dlpw.link_id AND dlpw.website_id = i.website_id WHERE (dl.value = 1) GROUP BY `i`.`entity_id`,
            `i`.`website_id` ON DUPLICATE KEY UPDATE `min_price` = VALUES(`min_price`), `max_price` = VALUES(`max_price`)

So I have an empty value in the Querry:
INNER JOIN catalog_product_entity AS dl ON dl.entity_id = i.entity_id AND dl.attribute_id = AND dl.store_id = 0

and that's a lot of fun because catalog_product_entity does not have an attribut_id column anyway …
So if you have any idea how to solve this case, I'm ready to listen

magento2 – Graduated prices will not be considered when adding to cart

I have set scale prices for products. When adding to the cart, the price should match the attached screenshot. Normal price is 30 while for 2 it will be 29.5 but after adding to the cart it still shows 30 for each quantity (Tier prices not working). I am using Magento2.2.4 "There is no associated protocol, so I have no idea where the problem lies.

Enter image description here

magento2 – Use the quote in the translation file of the CSV module

I'm trying to translate a module string and use a quote in the translated text

"If the quote is approuved, simply click to ""proceed to checkout"" and follow steps online to confirm your order.","Si la soumission est approuvée, cliquez simplement sur ""accepter la soumission"" et suivez les étapes en ligne afin de confirmer votre commande."

But in the HTML email, I have that

If the quote is approuved, simply click to ""proceed to checkout"

I tried to use




magento2 – call MAGENTO API 1.9 with HTML and JAVASCRIPT (expert question – problem) HELP

I need someone who knows MAGENTO and everything related to APIs and REST APIS very well

I have a website and I want to check if the email for a specific customer is in MAGENTO or not (Version 1.9)

In fact, only MAGENTO Version 2 has a standard API endpoint called customers / isEmailAvailable to check if the email is available, but I'm using MAGENTO version 1.9 so I can not use that. Do you understand me?

This is my HTML code:


Email Validator

AND it would be possible to call the MAGENTO 2 API with the following code:

        url: "page",
        type: 'POST',
        data: JSON.stringify({"customerEmail": ""}),
        contentType: "application/json",
        dataType: "json",
        showLoader: true,
        success: function (response) {

BUT I can not use that in MAGENTO 1.9, so I'm a bit desperate 🙁

How can I check if an e-mail exists or not?
similar, but instead for MAGENTO 1.9?

This is my MAGENTO API, take a look at this:


This is an example of the JSON I received from MAGENTO when I clicked "SEND" on POSTMAN:

        "magento_id": "54678",
        "firstname": "Richard",
        "lastname": "Herther",
        "email": "",
        "password": null,
        "website_id": "8",
        "group_id": "7",
        "disable_auto_group_change": "0",
        "prefix": null,
        "middlename": null,
        "suffix": null,
        "taxvat": null,
        "account_id": (
        "document": "66958746845",
        "document_type": "15",
        "gender": null,
        "telephone": null

Please note that I have a username and TOKEN to access the MAGENTO APIs

Please, I do not know what to do, I'm lost!

Many thanks