While getting data from "$this->productCollection->create()" Collection i want single column select but its not working direct addFeildToSelect()
We solve this issue using reset the Column " $collection->getSelect()->reset(\Zend_Db_Select::COLUMNS) ->columns(['entity_id']); " get the column which you want
How to get "FirstItem or LastItem" from collection to avoid foreach loop for single entry.
We have to pass "$collection->getFirstItem()->getId()"; like this u can get
drterwerer
werrwrwerwer
Server Solution Testing
ANS is for testing
Getting error after logged in into the Enrich Magento Admin 1 exception(s): Exception #0 (Zend_Json_Exception): Decoding failed: Syntax error Exception #0 (Zend_Json_Exception): Decoding failed: Syntax error
#1 Magento\Framework\Json\Decoder->decode() called at [vendor/magento/framework/Json/Helper/Data.php:60]
#2 Magento\Framework\Json\Helper\Data->jsonDecode() called at [app/code/Enrich/Appointment/Helper/Data.php:288]
#3 Enrich\Appointment\Helper\Data->processJson() called at [app/code/Enrich/SalonLocator/Helper/Admin.php:189]
#4 Enrich\SalonLocator\Helper\Admin->getOrgStructure() called at [app/code/Enrich/SalonLocator/Helper/Admin.php:304]
#5 Enrich\SalonLocator\Helper\Admin->setSelectedSalonStructure() called at [app/code/Enrich/SalonLocator/Helper/Admin.php:168]
#6 Enrich\SalonLocator\Helper\Admin->validateCurrentOrgLevel() called at [app/code/Enrich/SalonLocator/Observer/AdminPreDispatch.php:26]
#7 Enrich\SalonLocator\Observer\AdminPreDispatch->execute() called at [vendor/magento/framework/Event/Invoker/InvokerDefault.php:88]
#8 Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod() called at [vendor/magento/framework/Event/Invoker/InvokerDefault.php:74]
#9 Magento\Framework\Event\Invoker\InvokerDefault->dispatch() called at [vendor/magento/framework/Event/Manager.php:66]
#10 Magento\Framework\Event\Manager->dispatch() called at [generated/code/Magento/Framework/Event/Manager/Proxy.php:95]
#11 Magento\Framework\Event\Manager\Proxy->dispatch() called at [vendor/magento/framework/App/Action/Action.php:97]
#12 Magento\Framework\App\Action\Action->dispatch() called at [vendor/magento/module-backend/App/AbstractAction.php:231]
#13 Magento\Backend\App\AbstractAction->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#14 Magento\Backend\Controller\Adminhtml\Dashboard\Index\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#15 Magento\Backend\Controller\Adminhtml\Dashboard\Index\Interceptor->Magento\Framework\Interception\{closure}() called at [app/code/Enrich/Employee/Plugin/Backend/Authentication.php:154]
#16 Enrich\Employee\Plugin\Backend\Authentication->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#17 Magento\Backend\Controller\Adminhtml\Dashboard\Index\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#18 Magento\Backend\Controller\Adminhtml\Dashboard\Index\Interceptor->___callPlugins() called at [generated/code/Magento/Backend/Controller/Adminhtml/Dashboard/Index/Interceptor.php:39]
#19 Magento\Backend\Controller\Adminhtml\Dashboard\Index\Interceptor->dispatch() called at [vendor/magento/framework/App/FrontController.php:159]
#20 Magento\Framework\App\FrontController->processRequest() called at [vendor/magento/framework/App/FrontController.php:98]
#21 Magento\Framework\App\FrontController->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#22 Magento\Framework\App\FrontController\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#23 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#24 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
#25 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:137]
#26 Magento\Framework\App\Http->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]
#27 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:43]
Give permissions to Laravel Enrich API storage directory
Dir path:
ada-237@ada237-Latitude-3480:/var/www/html/enrichWeb-Magento$ bin/magento setup:upgrade Warning: include(/var/www/html/enrichWeb-Magento/vendor/composer/../../generated/code/Magento/Framework/App/ResourceConnection/Proxy.php): failed to open stream: No such file or directory in /var/www/html/enrichWeb-Magento/vendor/composer/ClassLoader.php on line 444
Solution : run CMD: -> sudo composer dump-autoload
Unmodified Files while installing new project remove from Untrack files git
GIT CMD -> git reset HEAD
how I can add a new tab left side menu in the User Edit/Add Module?
1. Example for Product existing code add direct
Need a validation dynamically for the any attribute ?
step1- if attribute is required = true in upgradeData.php . then need required = false and change the version
step2 - In mudule.xml file set the version as in upgradeData.php.
step 3 - create app/code/Enrich/Incentive/Plugin/Product/Validationrules.php file wire the code
getAttributeCode() == 'bonus_type'){
$rules['validate-bonus-type'] = true;
}
if ($attribute->getAttributeCode() == 'bonus_calc') {
$rules['validate-bonus-calc'] = true;
}
if ($attribute->getAttributeCode() == 'bonus_value') {
$rules['validate-bonus-value'] = true;
}
return $rules;
}
}
step 4- config plugin in di.xml
Mail Formates
Dear Freshchat Support Team, I am writing to inform you that I am currently experiencing errors while trying to integrate Freshchat on my website. I have been following the instructions provided in the integration guide, but I am still encountering issues. The specific error message that I am getting is: "Uncaught TypeError: window.fcWidget is undefined ". I have tried troubleshooting the problem on my end, but I have been unable to resolve the issue. I would greatly appreciate it if someone from your team could assist me in resolving this problem. I have also attached screenshots of the error message and my integration code for your reference. Thank you for your time and assistance in this matter. I look forward to hearing from you soon. Sincerely, Mukesh Yadav
main.WARNING: Memory size allocated for the temporary table is more than 20% of innodb_buffer_pool_size. Please update innodb_buffer_pool_size or decrease batch size value (which decreases memory usages for the temporary table). Current batch size: 295; Allocated memory size: 66198000 bytes; InnoDB buffer pool size: 134217728 bytes.
https://serverfault.com/questions/659597/how-to-permanently-increase-innodb-buffer-pool-size-on-ubuntu Here's what worked for me (ubuntu 19, mysql 8): sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf add in this at the bottom of the file innodb_buffer_pool_size = 8G save and exit. restart MySQL. sudo systemctl restart mysql
PHP restart diffresnt server diffrent cmds
https://serverfault.com/questions/189940/how-do-you-restart-php-fpm
413 Request Entity Too Large - File Upload Issue
Edit the conf file of nginx: nano /etc/nginx/nginx.conf Add a line in the http, server or location section: client_max_body_size 100M; Don't use MB it will not work, only the M! You can test the nginx config by: sudo nginx -t Then you need to restart or reload nginx: sudo nginx -s reload OR sudo systemctl restart nginx