magento2

How to move static block in magento 2.1.8 at the bottom of product list in Category

▼魔方 西西 提交于 2019-12-24 06:45:27
问题 I am using MAgento 2.1.8 but i am stuck in moving static block to bottom of product list of a category page as i want to write the content Before and after to products. 回答1: If you have child theme then override the catalog_category_view.xml. To override the xml file follow the below steps. Copy the file from path vendor/magento/mdoule-catalog/view/frontend/layout/catalog_category_view.xml paste it into the path app/design/frontend/vendor/theme/Magento_Catalog/layout/catalog_category_view.xml

Magento 2.0 override admin css (style.css)

时间秒杀一切 提交于 2019-12-24 01:10:31
问题 I am working in magento 2.0 and want to make changes in admin login panel. please suggest me how to override admin css files or how to add new css file. Thanks 回答1: you need to add a custom module and define css in desired xml or if you want to add in all pages create default.xml 1) add a module Ex. Emizentech/NewAdmin 2) create a new file view/adminhtml/layout/default.xml in the module <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column"

Magento 2 REST API call to get logged in customer ID

跟風遠走 提交于 2019-12-23 19:12:19
问题 I want to make a REST call from outside of Magento (but on the same domain) to get the currently logged in customer's ID. I don't want them to have to login again or provide a password, I just need to get their ID so I can redirect them somewhere based on their ID. I see this endpoint in the URL: http://.../rest/V1/customers/me but when I cURL that URL I get: Consumer is not authorized to access %resources Do I still need to get a token to access this even though it is anonymous and based on

Android : Magento 2 e-commerce Website not Working in android Webview

半腔热情 提交于 2019-12-23 10:24:55
问题 When I am trying to load a Magento 2 e-commerce website in android WebView , i'm getting following error message: "Unable to send the cookie. Maximum number of cookies would be exceeded." What's the cause of this error.? How can I fix this.? Could anyone help me.? Android Code WebView webView=(WebView) findViewById(R.id.disp); webView.getSettings().setJavaScriptEnabled(true); webView.getSettings().setLoadsImagesAutomatically(true); webView.getSettings().setLoadWithOverviewMode(true); webView

magento 2 rest api : get cart items with images

本秂侑毒 提交于 2019-12-23 02:36:39
问题 In rest api, I am using "/rest/V1/guest-carts/e3e1fd447e0e315dd761942cf949ce5d/items" method to get the magento cart items. It works well and the result is [ { "item_id": 100, "sku": "abc-1", "qty": 1, "name": "Product one", "price": 19, "product_type": "simple", "quote_id": "e3e1fd447e0e315dd761942cf949ce5d" }, { "item_id": 101, "sku": "abc-2", "qty": 1, "name": "Product two", "price": 54, "product_type": "simple", "quote_id": "e3e1fd447e0e315dd761942cf949ce5d" } ] Now I want get the images

Magento 2 Rest api to create order not adding shipping address

最后都变了- 提交于 2019-12-23 02:23:08
问题 I am trying to create an order using magento 2 rest api.But the shipping address is not adding with order details.Because of no shipping address the order is in incomplete format http://127.0.0.1/netmeds_mage/rest/V1/orders/create Method : PUT This is the json request : {"entity":{"base_currency_code":"INR","base_discount_amount":0,"base_grand_total":38,"base_shipping_amount":5,"base_shipping_incl_tax":5,"base_shipping_tax_amount":0,"base_shipping_discount_amount":0,"base_subtotal":33,"base

Set package and theme at run time in magento2

谁都会走 提交于 2019-12-22 08:53:36
问题 My package name is 'company' and my theme name is 'web', and I have another package named 'system' whose theme is named 'component'. Run time is from the Block file but I want to set that theme and package from the front-end side in magento2. 回答1: If you want to Set package and theme at run time in magento simply use this code snippet. create one function ex. changeTheme('Theme-name'); and run this function with your requirement add this function in your head.phtml after php start. function

Magento 2: reindexing is not working

廉价感情. 提交于 2019-12-21 04:52:43
问题 I'm not able to do reindexing in magento 2 . After google I get the solution that We can reindex with shell command php dev/shell/indexer.php reindexall But it's giving error Could not open input file: dev/shell/indexer.php As I can't see shell folder within dev . 回答1: fire this command from magento root via terminal reindex all : php bin/magento indexer:reindex reindex perticuler : php bin/magento indexer:reindex indexer_name Where indexer_name Should be catalog_category_product,catalog

Magento 2: reindexing is not working

久未见 提交于 2019-12-21 04:52:26
问题 I'm not able to do reindexing in magento 2 . After google I get the solution that We can reindex with shell command php dev/shell/indexer.php reindexall But it's giving error Could not open input file: dev/shell/indexer.php As I can't see shell folder within dev . 回答1: fire this command from magento root via terminal reindex all : php bin/magento indexer:reindex reindex perticuler : php bin/magento indexer:reindex indexer_name Where indexer_name Should be catalog_category_product,catalog

Add/remove image programmatically to product Magento2

僤鯓⒐⒋嵵緔 提交于 2019-12-21 02:47:08
问题 I am facing problem to add/remove image to product programmatically. 回答1: Use following code to add/remove image from product in Magento2. // Instance of object manager $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); *Remove Images From Product*/ $productId = ; // Id of product $product = $objectManager->create('Magento\Catalog\Model\Product')->load($productId); $productRepository = $objectManager->create('Magento\Catalog\Api\ProductRepositoryInterface');