New answers tagged

0

I came up with this # find out the store Ids for example with n98-magerun2 sys:store:list, in my case 9 + 10 select attribute_id from eav_attribute where attribute_code like "status" and entity_type_id = (select entity_type_id from eav_entity_type where entity_type_code = 'catalog_product') # note down the returned code, in my case 97 update ...


1

Assuming your list of SKUs is comma separted I would suggest a SQL statement: delete from catalog_product_website where website_id = YOURWEBSITEID ANd product_id IN (select entity_id from `catalog_category_entity` where sku in (sku1, sku2)) The Magento Backend does not provide a functionality to filter multiple products by their SKUs.


0

Well... Turns out it was as simple as going to the back-office and hitting the "Flush Magento Cache" button in the Cache Management page -_-'


0

You can write the sub query like this if ($collection->getMainTable() === $collection->getConnection()->getTableName(self::$table)) { $leftJoinTableName = $collection->getConnection()->getTableName(self::$leftJoinTable); $subquery = $collection ->getSelect() ->joinLeft( ['co'=>$...


0

Step 1: Fill the Tax Rule Information On the Admin Panel, Stores > Taxes > Tax Rules. In the upper-right corner, click on Add New Tax Rule. Under the Tax Rule Information section, set Name for the new rule. From the tax rate list, choose one of them to enable for the rule. However, for each the existing tax rate, you can edit it as the following: Tap ...


0

Step-1 Open the file and change replace validateURLScheme Method vendor\magento\framework\Image\Adapter\Gd2.php private function validateURLScheme(string $filename) : bool { $allowed_schemes = ['ftp', 'ftps', 'http', 'https']; $url = parse_url($filename); if ($url && isset($url['scheme']) && !in_array($url['scheme'], $...


0

tray this in your database INSERT INTO cataloginventory_stock(stock_id,website_id,stock_name) VALUES (1,0,'Default');


0

Looking at the error message posted, it looks like the customer attribute you created "profile_picture" accepts only "string" value, but you are passing an array of values. Try passing the value field with string as shown below. { "customer": { "email": "abc1@gmail.com", "firstname": "...


0

<?php namespace Vendor\Extension\Setup; use Magento\Eav\Setup\EavSetupFactory; use Magento\Framework\Setup\InstallDataInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\ModuleDataSetupInterface; use Magento\Catalog\Model\Product; use Magento\Catalog\Model\ResourceModel\Eav\Attribute; class InstallData implements ...


1

Step - 1 create your own src image array and push the all image link in that array. Examp - like this $image_source_files = []; foreach ($attribute->getOptions() as $option) { $src = $option->getLabel() . '.png'; $image_source_files[] = $src; } Step-2 $image_source_files array sort according to your requirement and check the $...


0

So if you're talking about ordering the layered/filtered nav on the category listing page (in the sidebar left or right), like this: https://imgur.com/a/hyLsZyF then you can set each number for the attribute under: Attribute Name > Storefront Properties > Position (Position of attribute in layered navigation block.) like this: https://imgur.com/a/...


0

This issue is found only on localhost. When you go to live the email logo show successful.


0

Try this solution :- <referenceBlock name="product.info.details"> <block class="Magento\Catalog\Block\Product\ProductList\Related" name="product.info.related" template="Magento_Catalog::product/list/items.phtml" group="detailed_info"> <arguments> <...


1

If you allow only CSV and xls file upload then you can add the method beforeSave into the CustomFileType.php and write the exception based on your file type. class CustomFileType extends \Magento\Config\Model\Config\Backend\File { /** * @return string[] */ public function getAllowedExtensions() { return ['csv', 'xls']; } ...


1

If you need to delete all the data row from the database table then you can be used the below code to truncate the table using the model. $connection = $model->getCollection()->getConnection(); $tableName = $model->getCollection()->getMainTable(); $connection->truncateTable($tableName); I hope this is helpful to you!!


0

When I tried to run php bin/magento indexer:reindex catalogrule_product command, I got below exception and fixed issue by removing duplicate entries and re running indexer command. Hope it helps someone report.CRITICAL: Item (Magento\CatalogRule\Model\Rule\Interceptor) with the same ID "9" already exists.


0

Go to Admin>Stores>configuration>Sales>Checkout Set Allow Guest Checkout to "NO"


0

What I did was just chown bob:group2 folder that has not got the right user permission and it works for me also.


0

The ngx_http_referer_module would be a perfect candidate for your use case. Simply list allowed referring domains and block the rest: server { server_name example.com; valid_referers none blocked server_names example.org; if ($invalid_referer) { return 403; } } Note, that the Referer: header is not guaranteed to be present, ...


0

It's better to create it via the admin panel by going to Stores > Configuration > Order Status, and ensure to create a new status for it. Don't forget to enable it. I Hope, with this you can see your custom generated status under order edit settings.


0

In your CustomFieldset class, overrides prepare function rather than isComponentVisible, the code should look like: public function prepare() { $visiable = // do some work to get boolean value; $config = $this->getData('config'); $config['visible'] = $visiable; $this->setData('config', $config); parent::...


0

"Set Product as New" field does not store value on the database level. module-catalog-staging is the module which is having implementation and in the backend, Magento EE also uses setNewsFromDate() and setNewsToDate() which depends on module-staging version id (vendor/module-catalog-staging/Model/Product/Hydrator.php) For rendering check below ...


1

Try to use below in foreach loop. First get the data in some variable and loop through that variable $proData = $productCollection->getData(); foreach ($proData as $key => $item) { var_dump($key); var_dump($item); var_dump($item['entity_id']); } // data will be display


0

After some discussion in the question's comments your problem appears to be a lack of a routes.xml combined with not managing the case of your links. Following the filenames and directories in the original question. You need a file called routes.xml in YourNamespace/YourModule/etc/frontend YourNamespace/YourModule/etc/frontend/routes.xml This would be an ...


0

It turns out using an observer wasn't the optimal solution - another process further down the chain was setting the status back to complete. I also didn't feel that overwriting a previously set status was the most elegant way to achieve what I needed. I was able to find the method responsible for changing the status of an order after it's set to both shipped ...


0

$getParams = $this->getRequest()->getParam('myparam'); this is fine to use a get params. However your controller has to be a get controller class MyAction extends \Magento\Framework\App\Action\Action implements HttpGetActionInterface if you want to use get parameters. I wrote a repository for you to take a look: https://bitbucket.org/magstaging/...


0

You miss this german.jpg file. If you add this file in your ftp, in the correct directory, it will be solved.


1

You need to create an UpgradeData class in Setup. Here is an example <?php namespace Custom\Module\Setup; use Magento\Eav\Setup\EavSetup; use Magento\Eav\Setup\EavSetupFactory; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\ModuleDataSetupInterface; use Magento\Framework\Setup\UpgradeDataInterface; class UpgradeData ...


1

To ignore database entities, add the <ignore> tag to an entity in the map.xml file, like this: For Example :- <source> <field_rules> <ignore> <field>sales_flat_order.dailydeals</field> </ignore> <ignore> <field>sales_flat_order....


0

Can you please tell, how to override _typography.less file in the theme? Need to override the whole file or override only the above code for "font-display: swap" for luma icons CSS.


-1

After some research, I found out it's either MySQL or MariaDB.


0

This is Magento bug. Wrong paths to Windows are generated. The fixed fix is Magento 2.3.0 - 2.3.3 #/vendor/magento/framework/View/Element/Template/File/Validator.php:140 the string if (0 === strpos($realPath, $directory)) { return true; } to replace $realDirectory = $this->fileDriver->getRealPath($directory); if ($realDirectory && 0 === ...


1

You can create a new order status by going to Stores > Configuration > Order Status, and create a new status for that and make sure it is enabled and you'll be able to see your custom generated status under order edit settings. Now to set your order to custom status whenever it is marked as shipped, you can put an observer event sales_order_save_after,...


0

$connection = new \Magento\Framework\Filesystem\Io\Sftp(); $connection->open( ['host' => $host, 'username' => $login, 'password' => $password] ); $connection->cd($dirPath); $pwd = $connection->pwd(); $connection->write($pwd .'/'. $ftpFileName, $filePath); $connection->close()...


1

if you look at the function \Magento\Catalog\Ui\Component\Listing\Columns::prepare in the core, this does create dynamically the columns for the catalog listing. Also, in the file vendor/magento/module-catalog/view/adminhtml/ui_component/product_listing.xml, you can see the line <columns name="product_columns" class="Magento\Catalog\Ui\...


1

Try this instead: $(document).on('change', '[name="street[0]"]', function(){ if (($(this).val()).match(poBox) !== null){ $(this).val(""); } }); I suspect your problem is the Knockout HTML gets rendered after your JS, using domReady! or jQuery.ready won't really help either as the checkout is slow and usually renders ...


0

This Works Fine ...Try This Out.. <item name="buttons" xsi:type="array"> <item name="add" xsi:type="array"> <item name="name" xsi:type="string">add</item> <item name="label" xsi:type="string" translate="...


0

Use This in Your Controller File... $post = $this->getRequest()->getPost(); Then You Can Use Form value using $post['your_field_name']


0

Custom customer attributes scope is global.


1

It was possible to do it by sql directly. But for the sake of scalability, I decided to create a small module that does enable you to update all your product attributes with a fixed given value. It goes without saying this module is not really viable but hopefully I might improve it somewhat. https://bitbucket.org/magstaging/productattributeupdate/src/master/...


1

By default the weight attribute should be applicable to the product types below. simple virtual bundle configurable downloadable giftcard If the attribute is not applicable for a specific product type the attribute won't show up. In the catalog_eav_attribute table there is a column (apply_to) which determines to which product types the attribute can be ...


0

can you change your event as following code. <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd"> <event name="customer_register_success"> <observer name="customer_save_die&...


0

I was trying to build a custom product type in 2.3.4 with the same issue and found the solution was actually in the saving of the options specifically after much debugging the following should help if anyone else has this problem. I would start by referencing this post: Extending bundle product in custom type ends up without "add option" button ...


0

Yes, I experienced the same bug issue using Magento 2.3.5-p1 (also 2.3.4) when trying to display "Display Products Availability in Stock on Storefront" and setting "Out-of-Stock Threshold" to 0. An imperfect alternative is to set the "Out-of-Stock Threshold" value to -1. However, this method will inflate the "Availability: ...


0

Check your CSV import file column "is_in_stock" the correct value for in stock items is '1' for out of stock the value is '0' I changed this in the CSV, did another import, and all the stock is showing. All I have to do now is get the images to display. thanks to Anna Gutmanska for this solution


0

Found out how to change store front, for some reason i needed to change a value in .htaccess file in SSH. When i change the old page to the new page i manage to point magento to the correct store front.


1

The Inventory project does all the things you want. Inventory Management features include Different configurations for merchants whose inventory originates from a single source and from multiple sources Stocks for tracking available aggregated quantities through assigned sources Concurrent checkout protection Shipment matching algorithms


0

Answering my own question. The assumption I made about ajax calls being cached was wrong. The page itself should be cached. There was a bug in this file, preventing the page from being cached: app/design/frontend/Codazon/fastest/fashion/Magento_Captcha/layout/default.xml This bug is fixed in later versions.


-1

I found an answer that helped, in vendor/magento/framework/Setup/Declaration/Schema/Db/SchemaBuilder.php:148 change to this //Prepare reference data $referenceData['table'] = $table; $referenceTableName = $referenceData['referenceTable']; $referenceData['column'] = $table->getColumnByName($referenceData['...


0

Navigate to admin->store->all store https://meetanshi.d.pr/r7su2x Check the number of stores here. Thank you.


Top 50 recent answers are included