Magento

Magento extensions, production environment & git

I have been testing magento latetly and I have been trying to figure the best way to track it with git. I created a new clean repository on GitHub and deployed it on a demo server where I invited colleagues to test drive it. The issue I faced is that ....

Ryder Ryder: 2 hours ago

Magento

Observer conditional continue with message

I created an observer in 'controller_action_predispatch_checkout_index_index', in the code i have: if (!in_array(false, $example, true)) { $this->_messageManager->addSuccess(__('Success message')); }else if (in_array(false, $example, true)) { if(!$this->_customerSession->isLoggedIn()) { $this->_messageManager->addError(__('ERROR')); $this->_redirect->redirect($controller->getResponse(), 'customer/account/login'); } } in the 'else if' all works great, but in the first condition i can't see the message in the ....

Ryan Ryan: 2 hours ago

Magento

Why observer->getEvent() gives the option to bring orders ids?

I don't understand why Magento gives the option to bring orders id's instead of just the recently order id, I'm developing a module and using this on the checkout_onepage_controller_success_action event: $orderIds = $observer->getEvent()->getOrderIds(); $orderShippingMethod = $order->getShippingAddress()->getShippingMethod(); $mediaBaseUrl = $this->_storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA);; foreach($orderIds as $orderId) { $order = $this->_order->load($orderId); /// more code... } ....

Amir Amir: 2 hours ago

Magento

My form is not showing which i have created under subcategory in magento

I had created a menu in subcategory and created the form in phtml file when I click on the subcategory link the form is not showing.It is showing the page not found.Please anyone help me. In admin catalog->Manage categories->add sub category in this I had created the link. My form ....

Ryan Ryan: 2 hours ago

Magento

My Save Config Button [Stores>Configuration] in Magento 2.3.3 Doesn't Work

I can't make any changes because after making the changes the save config button just doesn't work. Please help. Thank you ....

Aaliyah Aaliyah: 3 hours ago

Magento

How to create password Field

So i create an xml for form like this <field name="password"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="label" xsi:type="string" translate="true">Password</item> <item name="dataType" xsi:type="string">password</item> <item name="formElement" xsi:type="string">input</item> <item name="validation" xsi:type="array"> <item name="required-entry" xsi:type="boolean">true</item> </item> </item> </argument> </field> so i want to the field to be like the usual html password ....

Jaxson Jaxson: 3 hours ago

Magento

Mutiple Domains

I have a problem. I cannot make a second store view operate with its own domain. I am on a shared host in New Zealand and my web host is scratching their head and steering back at me when I mention magento. Domain A.com (for international customers) on store A ....

Luna Luna: 3 hours ago

Magento

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry - Magento 2

I'm trying to setup my crons for Magento 2.2.2, but nothing seems to be updating. I have created cron in cPanel, like below, each once per minute: /usr/local/bin/php /home/userishere/public_html/bin/magento cron:run | awk '{ print strftime("\%Y-\%m-\%d \%H:\%M:\%S"), $0; fflush(); }' 2>&1 >> ~/magento_cron.log /usr/local/bin/php /home/userishere/public_html/update/cron.php | awk '{ print strftime("\%Y-\%m-\%d \%H:\%M:\%S"), ....

Elizabeth Elizabeth: 3 hours ago

Magento

Magento newsletter delivery speed for 5000 emails

How much time will magento take to send 5000 emails ? with the default newsletter functionality. I will be using a private server so i don't think there will be issues regarding the server performances. ....

Amelia Amelia: 3 hours ago

Magento

Resourcemodel plugin not working - Magento2

app/code/Mymodule/Orderedproductsreport/etc/di.xml <type name="Magento\Reports\Model\ResourceModel\Product\Sold\Collection"> <plugin disabled="false" name="Mymodule_Module_Plugin_ProductSoldCollection" sortOrder="2" type="Mymodule\Orderedproductsreport\Plugin\ProductSoldCollection"/> </type> app/code/Mymodule/Orderedproductsreport/Plugin/ProductSoldCollection.php <?php namespace Mymodule\Orderedproductsreport\Plugin; class ProductSoldCollection extends \Magento\Reports\Model\ResourceModel\Order\Collection { public function afterAddOrderedQty( \Magento\Reports\Model\ResourceModel\Product\Sold\Collection $subject, $result,$from = '', $to = '' ) { $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/ProductSoldCollection.log'); $logger = new \Zend\Log\Logger(); $logger->addWriter($writer); $logger->info('Your text message'); return $this; } } public ....

Victoria Victoria: 3 hours ago