New answers tagged

2

You just need to change parameter type in your interface. Set $data type "array" from "string" : <?php namespace Garage\Motogaadi\Api; interface GarageInsert { /** * Returns greeting message to user * * @api * @param array $data * @return string Greeting message with users name. */ public function insert($data); }...


2

Please remove generated directory and run below command once to fix type error occurred when creating object error php bin/magento setup:upgrade php bin/magento cache:clean php bin/magento cache:flush Hope this will help you!


0

follow this link for dynamic menu. https://inchoo.net/magento/insert-dynamical-menu-in-magentos-admin/ or for easy way follow this one. https://tonytemplates.com/blog/how-to-create-a-new-menu-item-in-the-magento-admin-panel/


0

Try to run command like.. composer config repositories.compactcode-base git git@github.com:CompactCodeEU/base.git && composer config repositories.compactcode-intercom git git@github.com:CompactCodeEU/intercom.git composer require "compactcode/intercom:dev-master" php bin/magento setup:upgrade Follow this link Hope this will help you!


1

I checked your code and found following error at: app/code/local/Custom/ShippingMethod/etc/config.xml You need change model in <customshippingmethod> tag from <model>shipping/carrier_customshippingmethod</model> to <model>shippingmethod/customshipping</model> Explanation: model name and path is wrong and it should be [...


0

Please follow below steps. You can check your new template value in DB using below given QUERY SELECT * FROM core_config_data WHERE path LIKE 'design/email/header_template' Hope this will help you!


0

The reason the override for Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection doesn't work is because of the virtual type override in vendor/magento/module-elasticsearch/etc/di.xml. In your di.xml you need to declare the following preferences: <preference for="elasticsearchFulltextSearchCollection" type="Vendor\Module\Model\ResourceModel\...


1

For rearrange or change account link label override customer_account.xml into your theme or existing custom module. in theme ... app/design/frontend/{{vendor}}/{{theme}}/Magento_Customer/layout/customer_account.xml or in existing custom module. app/code/{{vendor}}/{{modulename}}/view/frontend/layout/ and update order of your link where you want to move....


2

You need to run below command to disable MSI modules in Magento 2.3+ versions. To disable modules run below command php bin/magento module:disable Magento_Inventory Magento_InventoryAdminUi Magento_InventoryApi Magento_InventoryGraphQl Magento_InventoryBundleProduct Magento_InventoryBundleProductAdminUi Magento_InventoryCache ...


0

After many attempts I solved this problem. I installed an older version of SMTP (1.2.11) module and the latest of Core module. The core module was installed via composer. The SMTP module was installed with folder method. This worked for me, it seems that it was a license key issue, because on Mageplaza site, I have a license key with the SMTP version 1.2....


0

if you want to used only XML file for Enable and Disable Module. you have to Used ifconfig in Block conteiner and Refernece Container. <block class="Magento\Catalog\Block\Category\View" name="category_desc_main_column" template="category/desc_main_column.phtml" ifconfig="config_path/group/field" before="category.products"/> <move element="category....


0

Not sure why it happens. Install it via composer : composer require mageplaza/module-smtp php bin/magento setup:upgrade php bin/magento setup:static-content:deploy Then, follow details from here https://github.com/mageplaza/magento-2-smtp Hope, it will helpful for you.


0

Default value store wise for custom fields for customer module create account section: <stores> <default> <customer> <create_account> <postcode_validation>postcodevalidation-GB</postcode_validation> <postcode_format>Accepted Formats:- AA9A 9AA, A9A 9AA, A9 9AA, ...


0

I figured out a solution that works for me. In the beforeDispatch() method of my FrontControllerInterface plugin, I have the following block of code: $requestPath = $this->request->getPathInfo(); // If a coupon code was included in the URL, fix the URL // after extracting it so that we can continue to route normally if (preg_match("#/discount/([^/]+?)...


0

You can use below code in your Collection.php file protected function _initSelect() { parent::_initSelect(); $this->getSelect()->where("main_table.order_id IS NULL"); return $this; } Hope this will help you!


0

For this your requirement, you need to use Custom routers instead of plugin on FrontControllerInterfaceetc. Custom router has the ability to handle the custom URL as per as business logic. Custom router internally hit the Magento Standard router Url www.example.com/<front-name>/<controller-name>/<action-name> .At Magento ,if you want to ...


0

Looks like this is working for others and there's just something strange going on with my own instance of Magento.


0

Please go to your directory and find 'app/etc/config.php If you want disable module just replace 1 to 0. For your check our below example. 'Developer_Categoryimages' => 1, Replace To 'Developer_Categoryimages' => 0 open the terminal and navigate to Magento webroot. $ cd /var/www/html/magento2 $ php bin/magento setup:upgrade $ php bin/magento setup:...


0

Please go to your directory and find 'app/etc/config.php If you want disable module just replace 1 to 0. For your check our below example. 'Developer_Categoryimages' => 1, Replace To 'Developer_Categoryimages' => 0 After that flush Magento Cache.


0

I finally found by myself. In google_survey.phtml the correct code to call the function getGoogleSurvey() is: $blockObj= $block->getLayout()->createBlock('TV2M\GoogleSurvey\Block\Onepage\Success'); echo $blockObj->getGoogleSurvey(); For the entire module to work we need the files mentioned above: TV2M/GoogleSurvey/registration.php TV2M/...


0

You can find your module from here 'app/etc/config.php' and replace 1 to 0 then it will be disabled. Clean cache Hope it works for you.


1

First of all, remove your module from the setup_module table. DELETE FROM `setup_module` WHERE module='Rafaelcg_Quicklink`; Remove all the custom configurations already configured. DELETE FROM `core_config_data` WHERE path LIKE '%quicklink%'; And check if the etc/config.xml is correct, for example, I have this file below. <?xml version="1.0"?> <...


0

fulltext search only work if you have add index in your database table. to add Index in your table use below code. $setup->getConnection()->addIndex( $setup->getTable('quote_id_mask'), $setup->getIdxName('quote_id_mask', ['masked_id']), ['masked_id'] ); Reference


1

You need to create one events.xml file here in your custom module app/code/Vendor/Module/etc/events.xml Content for this file is.. <?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="checkout_submit_all_after"> ...


0

STEP 1 : as i have mentioned before you need to get current order status here using its API or MODEL by providing DI in the file like e.g $order->getStatus(); SETP 2 : when you get the current status update status to what ever you want like e.g $order->setStatus('complete'); STEP 3 : now you have to save the order in order to save your ...


0

first you have a problem in your TV2M/GoogleSurvey/Block/Onepage/Success.php you defined namespace two times change file to this <?php namespace TV2M\GoogleSurvey\Block\Onepage; use \Magento\Framework\View\Element\Template; class Success extends \Magento\Checkout\Block\Onepage\Success { public function getEmail() { return "my@email....


0

you should run di:compile command, also pass require parameters in constructor of parent class(\Magento\Checkout\Block\Onepage\Success) Also change getEmail() function name it will be good in practice because we also access DB field by getEmail(). You should have call that template file with your current block in layout file. Can you please share the ...


-1

Sorry for being late, I think this is the extension you need for hiding the price from the store: https://www.mageplaza.com/magento-2-hide-price/ Thank me later ^^


1

Prefere setting template in layout, so it could be extended easily in other modules just using layout. If you have to set template depending on a condition, you could do it programmatically in block, just think of extensibility by using a public function (so it could be extended by plugin)


1

No that will not work unless you rebuild the checkout to not use UI components, this is because UI component templates are rendered client side which does not support PHP as it runs on the server and not the client.


0

I am using the Ultimo theme on Magento 2.3.3. I couldn't disable the compare link from the theme's catalog_product_view.xml file as the settings are not coming from there but they are located in: vendor/magento/module-catalog/view/frontend/layout/catalog_product_view.xml I went for the quick and dirty solution, simply removed the following: ...


Top 50 recent answers are included