I implemented a custom plugin that loops through all products and generates a CSV file. Even if the execute() function has the same code in both files (cron job and controller), the CSV file generated is slightly different. The controller generates the CSV as expected, but the cron job is […]
Magento
I use the core API /V1/products/:sku to get the product using the SKU. for example, I have 2 stores, one in English and another in Japanese. My API Endpoint is like http://local.mystore.com/storefront/en-us/rest/V1/products/myproduct for the English store and http://local.mystore.com/storefront/en-us/rest/V1/products/myproduct for the Japanese. For both the API I am getting the same […]
I have this method which is meant to save the product during an import script. protected function saveProduct($product, $urlKeySuffix = 0, $baseUrlKey = false) { $savedProd = null; try { if($urlKeySuffix) $product->setUrlKey($baseUrlKey . '_' . $urlKeySuffix); $savedProd = $this->productRepository->save($product); } catch (AlreadyExistsException $e) { $urlKeySuffix++; $baseUrlKey = $baseUrlKey ?: $product->getUrlKey(); […]
Is there a way to update the Order ID prefix based on the user’s customer group? E.G. wholesale customer starts with 2 while retail starts with 1.
in my authorization request builder as apart of my payment method facade, I need to fetch the quote or order id to pass it to the client…. class AuthorizationRequestBuilder implements BuilderInterface { public function build($buildSubject) { // get order here (type of order is MagentoPaymentGatewayDataOrderOrderAdapter) // this order doesn't have […]
I am trying to figure out the flow add to cart item. Note: before add to cart my cart is empty I have a simple product and it has one qty and product inStock is yes, it does not go prepare function in following path MagentoQuoteModelQuoteItemProcessor.php because I put die() […]
I’m having a problem with the Magento 2 currency rate. I have a question is it also possible to automate Magento 2.3.4 currencies, for example, JPY, HKD and USD? can you show me the process of how to do it Programmatically or any extension? Thanks
I can’t find the file or the html for guest shipping address. I want to change the telephone input type from input type = text to input type = number. Any suggestion where to find it or how to customize this bug? (To produce this bug, checkout an item without […]
When I want to change a Magento 2 Category’s Products position you can do so by manually editing the Position column number field which works just fine. I want to edit those position numbers via jQuery in the Chrome Developer Console and click the ‘Save’ button to save those changes. […]