app/code/local/Info/news/Bock/Adminhtml/news/Grid.php <?php class Info_News_Block_Adminhtml_News_Grid extends Mage_Adminhtml_Block_Widget_Grid{ public function __construct(){ parent::__construct(); $this->setId('newsGridView'); $this->setDefaultSort('news_id'); $this->setDefaultDir('DESC'); $this->setSaveParametersInSession(true); } protected function _prepareCollection(){ //$collection=new Varien_Data_Collection(); $collection = Mage::getModel('news/news')->getCollection(); $this->setCollection($collection); return parent::_prepareCollection(); } protected function _prepareColumns(){ $this->addColumn("news_id",array( "header"=>Mage::helper("news")->__("ID"), "type"=>"number", "index"=>"news_id" )); $this->addColumn("news_title",array( "header"=>Mage::helper("news")->__("Title"), "type"=>"text", "index"=>"news_title" )); $this->addColumn("news_content",array( "header"=>Mage::helper("news")->__("Content"), "type"=>"text", "index"=>"news_content" )); } } app/code/local/Info/News/Model/News.php <?php class […]
Magento2
Basically i want to get the stock status for att the children items of a configurable product. I can query this endpoint, but i don’t get the stock status: /rest/V1/configurable-products/{SKU}/children However, i can use the SKU’s from the items that i get from the response from the endpoint mentioned above, […]
I have two store English Arabic In Arabic stores, product prices or other custom prices are shown in Arabic numbers instead of English numbers. like ٥٠٫٠٠$ only the Product details page price shows correctly. how we can show English numbers in both stores?
Job for elasticsearch.service failed because the control process exited with error code. See “systemctl status elasticsearch.service” and “journalctl -xe” for details. [root@server elasticsearch]# systemctl status elasticsearch.service ● elasticsearch.service – Elasticsearch Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since 二 2022-11-15 23:00:29 CST; 18s ago Docs: https://www.elastic.co […]
I want to reset the “Users” ID numbers back to 1, 2, 3…. Under System > Permissions > All users I’m presuming this is something that needs to be done in the DB. How can I do this?
When I try to execute any magento command it gives me the following error: PHP Fatal error: Uncaught Error: Cannot instantiate interface MagentoFrameworkInterceptionConfigLoaderInterface in /home/vagrant/code/%PROJECT%/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121 As you can see in the error message I am using a vagrant box to try and get my project running locally. Just did a […]
I want to override vendor/magento/module-checkout/Model/GuestPaymentInformationManagement.php. I made a di.xml in app/code/Jilco/Qtybug/etc/ like this: <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <preference for="MagentoCheckoutModelGuestPaymentInformationManagement" type="JilcoQtybugModelGuestPaymentInformationManagement" /> </config> And the GuestPaymentInformationManagement.php in /home/jilco/public_html/app/code/Jilco/Qtybug/Model/ Also dit the deployement steps rm -rf generated/code/* php bin/magento cache:flush php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy php bin/magento setup:static-content:deploy nl_NL […]
How to show a popup as soon as customer logs in. I created an customer_login event and called an observer, I want to display a phtml file with my popup code. Following doesn’t work etc/frontend/events.xml <?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_login"> <observer name="customer_login_observer" instance="VendorModuleObserverCustomerLogin" /> </event> </config> Observer/CustomerLogin.php <?php […]
Is there anyone help me please for removing malware from the sites. Screenshot is attached. Please check and help me. I’m very worry about that.