New answers tagged

0

I am Changing UAE Currency symbol.... add_filter('woocommerce_currency_symbol', 'change_existing_currency_symbol', 10, 2); function change_existing_currency_symbol( $currency_symbol, $currency ) { switch( $currency ) { case 'AED' : $currency_symbol = 'AED'; break; } return $currency_symbol; }


0

I have got answer.All Suggestions. My Controller File CustomerDelete.php. And I have get current time $current_time = time('h:i:s'); In Email Template set time like :- ->setTemplateVars([ "name" =>$customerName, "id" => $encodeId, "time" => $current_time ]) In Email Template my account_expire.html file ...


0

This happens when you try to add products in magento having duplicate names . If the magento had already a product with same name the url is generated according to the name . So in short DON'T DUPLICATE PRODUCT NAME if you are not specifying product urls manually in the upload csv There are 2 possible solutions . change your product name in the ...


1

I can suggest a solution using cache lifetime (10 minutes), save your token_key into cache service with 10 minutes is cache lifetime, if you can't get your token_key on the cache system, that means the token_key is expired.


0

Reshad I would suggest, try with the command line composer to upgrade the magento. Please follow below tutorial step by step and it will help you to upgrade magento easy and faster way. https://devdocs.magento.com/guides/v2.4/comp-mgr/cli/cli-upgrade.html Thanks.


1

If you are saving data in the database than save current time and then compare that time and date. if you are not saving it then pass date and time in parameters and compare it with current time date. Happy coding


0

Change the url key because URL is already generated by another product so magento is refusing to accept that URL key. URL key must me unique


1

Unorthodox solution just for fun :) You mentioned that you're sending inside controller: namespace MyCompany\MyModule\Controller\Token; use Magento\Framework\App\Action\Context; use Magento\Framework\Cache\FrontendInterface; use Magento\Framework\Controller\Result\Raw; use Magento\Framework\Controller\ResultFactory; class Send extends \Magento\Framework\...


1

You can generate a link with param attached to it. This param can be a timestamp or token. 1. Approach with timestamp Your page link in email would be something like <a href="https://your-site/your-page?expires=1600881883">Click here</a> On your page, you can get the expire timestamp from URL, generate timestamp of current time & ...


1

Try this code My Controller is as below : <?php namespace Apriljune\Testimonial\Controller\Adminhtml\Testimonial; class Edit extends \Magento\Backend\App\Action { protected $resultPageFactory; public function __construct( \Magento\Backend\App\Action\Context $context, \Magento\Framework\View\Result\PageFactory $...


0

This is still valid for 2.3.5. I just extended a NAB transact extension to display and pass a reCaptcha token to the model. Thanks :)


0

i also got the same issue this is the final sollution I confirm, this happens also in 2.3.5-p1 The solution set in db table: email_template column is_legacy = 1 set is_legacy = 1 in desired template and it will start working like miracle Thanks


0

Update to "~3.1.0". You can get list of available versions like this composer show magento/magento2-functional-testing-framework 3.*.* --all | grep -m 1 versions


0

For development you can try this: php bin/magento config:set dev/front_end_development_workflow/type client_side_compilation php bin/magento cache:flush Reference to official DevDocs: https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/css-guide/css_quick_guide_mode.html#using-client-side-compilation-mode


0

First of all, make call on /rest/default/V1/integration/customer/token instead of on /index.php/rest/default/V1/integration/customer/token. Second, make sure you don't make call to mapped subdomains. For example if you mapped localhost or 127.0.0.1 onto mydomain.local in /etc/hosts, don't make call to http://mydomain.local/rest/default/V1/integration/...


0

Magento 1.7? I would advise upgrading to the latest 1.9 or closing the site as it will be hacked very soon. The validate function on that line is called on either the billing or shipping address of the order. $address = $isOrderVirtual ? $order->getBillingAddress() : $order->getShippingAddress(); So this suggests the address didn't' save correctly on ...


1

Try the following way: if($request->getPackageWeight() > $this->getConfigData('max_weight')) { return false; }


0

That is because Magento 2.3.4 doesn't support ElasticSearch 7. Support has been introduced with Magento 2.3.5 and Magento 2.4. Even if you get rid of that error, there might be others to follow. Upgrade to Magento 2.3.5 or Magento 2.4 and it should work perfectly.


1

The following has been tested on Magento 2.3.4 and 2.4.0 app/code/Create/Attribute/view/adminhtml/ui_component/category_form.xml <?xml version="1.0" ?> <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd"> <fieldset ...


1

explode can split a string by a string into an array Here is a reference sample. $customerGroup = $this->_customerSession->getCustomer()->getGroupId();//1 $groupsInString = $this->getConfigData('groups'));//(string) "1,5,9,10" $groupsInArray = explode(",",$this->getConfigData('groups'));//(array) [1,5,9,10] if(!in_array($...


0

You receive a comma separated string from the db. use explode (php native function) and then in_array() docs for explode https://www.php.net/manual/en/function.explode.php


0

I had the same problem with another message, I got: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'default-0-amasty_checkout/layout_builder/layout_builder_config' for key 'CORE_CONFIG_DATA_SCOPE_SCOPE_ID_PATH', query was: INSERT INTO `core_config_data` (`scope`, `scope_id`, `path`, `value`) VALUES (?, ?, ?, ?) So I opened phpmyadmin ...


0

Using this code I succeed add product to cart but without Custom options type : Date and field <?php $magentoURL = "*************************"; $station = "fr"; $data = array("username" => "**********", "password" => "**********"); $data_string = json_encode($data); $ch = curl_init($...


Top 50 recent answers are included