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: 4 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: 4 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: 4 hours ago

Magento

magento 2 add owl carousel to recently viewed products

I am trying to add owl carousel to recently viewed products in product detail page by making custom theme and creating viewed_grid.phtml in app/design/frontend/_YOUR_VENDOR_/YOUR_THEME/Magento_Reports/view/frontend/templates/widget/viewed/content and requirejs.config.js in app/design/frontend/_YOUR_VENDOR_/YOUR_THEME/Magento_Reports . But still I am not able to get slider. ....

Aurora Aurora: 4 hours ago

Magento

Magento 1.9.1: Bundle Items Doesn't Show All Products For Selection

Update: Digging through app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/Grid.php and making some progress. Commenting out the filters help... protected function _prepareCollection() { $collection = Mage::getModel('catalog/product')->getCollection() ->setStore($this->getStore()) ->addAttributeToSelect('name') ->addAttributeToSelect('sku') ->addAttributeToSelect('price') ->addAttributeToSelect('attribute_set_id') ->addAttributeToFilter('type_id', array('in' => $this->getAllowedSelectionTypes())); //->addFilterByRequiredOptions(); //->addStoreFilter(); Single store installation. When I try to the "Please Select Products to Add" step I cannot see all the ....

Delilah Delilah: 5 hours ago

Magento

The value of attribute "Is Active" must be set -error always when trying to create category via SOAP

I'm trying to create a category via SOAP $category_data = ; // $category_client $category_client = new SoapClient( 'http://host/soap?wsdl&services=catalogCategoryRepositoryV1', $category_client->catalogCategoryRepositoryV1Save($category_data); I'm getting an error Could not save category: %1 with details The value of attribute "Is Active" must be set. What is wrong here? ....

Ariana Ariana: 5 hours ago

Magento

Get order collection by order id in Magento 2?

I am trying to get order collection by order id in Magento 2. Here is my code: $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $orders = $objectManager->create('Magento\Sales\Model\Order')->getCollection()->load($oid); echo $custLastName= $orders->getCustomerLastname(); But its is giving fatal error: Call to undefined method Magento\Sales\Model\ResourceModel\Order\Collection::getCustomerLastname() ....

Valentina Valentina: 5 hours ago

Magento

Product Gallery Image Upload Issue in Magento 2.1.4

While uploading an image to the product gallery in magento backend product edit, I am getting the below error. "We Dont Recognize or Support this File Extension type" For all extension types i am getting the same error and I am getting product Upload call response as "File was not ....

Ayla Ayla: 6 hours ago

Magento

Magento rewrite 'Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Options_Option' not working?

below is my config.xml files code with path. app/code/local/Eventprice/Meta/etc/config.xml <?xml version="1.0"?> <config> <modules> <Eventprice_Meta> <version>0.0.1</version> </Eventprice_Meta> </modules> <global> <models> <eventprice_meta> <class>Eventprice_Meta_Model</class> </eventprice_meta> </models> <resources> <eventprice_sql> <setup> <module>Eventprice_Meta</module> </setup> </eventprice_sql> </resources> <blocks> <settings> <class>Eventprice_Meta_Block</class> </settings> <adminhtml> <rewrite> <catalog_product_edit_tab_options_option> Eventprice_Meta_Block_Adminhtml_Catalog_Product_Edit_Tab_Options_Option </catalog_product_edit_tab_options_option> </rewrite> </adminhtml> </blocks> </global> </config> Below is my Option.php file code ....

Declan Declan: 6 hours ago

Magento

How to get the value of certain applied filter from layered navigation?

i need to display value of certain applied filter in layered navigation. <?php $appliedFilters = Mage::getSingleton('catalog/layer')->getState()->getFilters(); foreach ($appliedFilters as $item) { $item->getName(); $item->getLabel(); $item->getFilter()->getRequestVar() == 'my_attribute'; // My attribute code echo $item->getLabel(); } ?> This code returns all the values ​​of all the selected attributes. I need to display only ....

Ivy Ivy: 6 hours ago