Could anyone kindly suggest how I could have my product’s short description shown in a customer order confirmation email? I am currently running Magento (Community) 2.4.2. I’ve attempted to add the following code to my theme @ “THEME/Magento_Sales/templates/items/order/default.phtml”. I get the surrounding HTML code, but no data returned. <td class="item-info<?= […]
Magento
I created a new storeview accessible under the URL app.example.com I added this to the .htaccess to set the MAGE_RUN_CODE Environment Variable to app if the URL app.example.com is called: SetEnv MAGE_RUN_TYPE store SetEnvIf Host ^example.com MAGE_RUN_CODE=default SetEnvIf Host ^www.example.com MAGE_RUN_CODE=default SetEnvIf Host ^app.example.com MAGE_RUN_CODE=app SetEnvIf Host ^www.app.example.com MAGE_RUN_CODE=app Then […]
public function execute() { $data = []; $file = $this->getRequest()->getFiles('refundcsv'); print_r($file);//display the input file name if (!isset($file)) { throw new MagentoFrameworkExceptionLocalizedException(__('Invalid file upload attempt.')); } $data = $this->csv->getData($file); //throws error print_r($data); foreach ($csvData as $row => $data) { if ($row > 0) { print_r($row); } } die(); } I want […]
I’m looking for a way to show the compare feature only on category or product pages but not at other pages like CMS pages. I found several ways to disable the enite compare feauture but can’t find-out how to remove the sidebar from other pages then category or product pages.
I am working with Magento using apache, I don’t know why but suddenly MySQL server is stopped in xampp, when I am trying to click on the start button of MySQL it’s not starting it shows an Error: MySQL shutdown unexpectedly. When I open PHPMyAdmin I got this error (no […]
I have created one custom product attribute(bestseller). Now I want to sort by custom product attribute(bestseller) using search criteria builder sort by option but it’s not working for custom product attribute. FYI Sort by option working with price attribute but not working with custom product attribute option. Any help appreciate… […]
how to install my custom module on another magento2 project from git using composer i tried with composer config ->this work fine . when i run composer require its shows error [RuntimeException] Failed to execute git clone --mirror anybody please explain me to install a custom module by this method.
List.phtml: <?php $_productNameStripped = $block->stripTags($_product->getSecondName(), null, true); ?> <h2 class="product name product-item-name"> <div class="brand-name"> <?php $optionText = ''; $attr = $_product->getResource()->getAttribute('manufacturer'); if ($attr->usesSource()) { $optionText = $attr->getSource()->getOptionText($_product->getManufacturer()); } ?> <?php if($optionText){ ?> <?php echo "" . $optionText . "<br>"; ?> <?php } ?></div> <a class="product-item-link" href="<?= /* @escapeNotVerified */ $_product->getProductUrl() […]
I was trying to upgrade from 2.4.2 to 2.4.3 in my test environment. While trying to run bin/magento setup:upgrade, The below error appeared: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘249191’ for key ‘PRIMARY’, query was: ALTER TABLE catalog_url_rewrite_product_category ADD CONSTRAINT PRIMARY KEY (url_rewrite_id) How to fix these issues