How i get current product name in sendEmail funtion if (isset($result) && $result) { $this->emailHelper->sendEmail('Product', $productName); } And this is my full code. <?php declare(strict_types=1); namespace custommoduleScheduleContentNotifierPlugin; use MagentoCatalogStagingModelProductApplier; use custommoduleScheduleContentNotifierHelperEmail; use MagentoCatalogModelResourceModelProductCollection; use MagentoStagingApiUpdateRepositoryInterface; class PluginProductApplier { protected $emailHelper; protected $product; /** * @var UpdateRepositoryInterface */ protected $updateRepository; /** […]
Magento2
I am using Magento 2.1 and have configured it to store media files in an S3 bucket. However, when I try to upload a product image, I encounter the following errors: Despite these errors, I can see the product images listed and accessible. Could you please provide some guidance on […]
New created products are not coming in category pages or search pages . Where should i debug to find why they are not comming in front-end. Even direct product view they are showing in front-end.
I am trying to save product attributes in my Magento2 system and there may be 100 thousands of attributes. However, I see that the value specified as auto increment in the eav_attribute table is defined as smallint. In this case, I get an error when I reach the value 65535 […]
I’m successfully import from a CSV file a massive number of SIMPLE products. Than I created the CONFIGURABLE products and assigned the simples by $configurableproduct_load->setCanSaveConfigurableAttributes(true); $configurableproduct_load->getTypeInstance()->setUsedProductAttributeIds(array(258,267,178), $configurableproduct_load); $configurableAttributesData = $configurableproduct_load->getTypeInstance()->getConfigurableAttributesAsArray($configurableproduct_load); $configurableproduct_load->setConfigurableAttributesData($configurableAttributesData); $configurableproduct_load->setAssociatedProductIds($associatedProductIds); $configurableproduct_load->save(); where 258, 267, 178 are the attributes id in the sort that I want. However, Magento create […]
Response validation: Before accessing the items[0] property of the response object, it is important to check if the items array is empty to avoid errors. /** * @throws Exception */ private function getContact(ORNInterface $orn, $returnId=false) { try { $requestData = json_decode($orn->getRequest()); $queryUrl = "select id from contacts where contacts.emails.address='" . […]
Magento 2 – Checkout. Remove “New Address” Button from checkout billing/shipping address with module for B2B customers
I am using plugin <type name="MagentoCustomerModelAccountManagement"> <plugin name="custom_change_reset_password_link_token" type="VendorMobileAppPluginAccountManagementPlugin" sortOrder="10" disabled="false"/> </type> and using Around on method aroundChangeResetPasswordLinkToken but problem is it is working on APIs but when I try to access the reset link on web it always gives me error Your password reset link has expired. Here is […]
I am getting the below error: main.CRITICAL: TypeError: str_replace(): Argument #3 ($subject) must be of type array|string, null given In the following code: public function beforeSendResponse(Http $subject) { if ($this->ampService->isAmp()) { return; } $store = $this->storeManager->getStore(); if (!$this->configProvider->getGeneralIsEnable($store) && !$this->configProvider->getIsPixelEnabled($store)) { return; } $content = $subject->getContent(); if ($this->configProvider->getGeneralIsEnable($store)) { $regularCode […]