Skip to content

Get customer orders excluding ones with a specific order item

I want to retrieve all customer orders’ except the ones that have a specific item (walle product) Currently, I get all orders that have the item and then filter them from orderCollection $orderItemCollection = $this->orderItemCollectionFactory->create(); $orderItemCollection->addFieldToFilter(‘sku’, Data::WALLET_PRODUCT_SKU); $walletOrders = [];… Read More »Get customer orders excluding ones with a specific order item

How I can retrieve the Image Url of a given product?

I have a custom block in magento 2.4 where I retrieve a image List namespace PcmagasFirstModuleBlockMyList; use MagentoCatalogModelProductRepository; use MagentoFrameworkApiSearchCriteriaBuilder; use MagentoFrameworkViewElementTemplate; class MyList extends Template { private ProductRepository $productRepository; private SearchCriteriaBuilder $searchCriteriaBuilder; public function __construct( TemplateContext $context, ProductRepository $productRepository,… Read More »How I can retrieve the Image Url of a given product?

How I can get products using multiple skus?

In my custom block I loaded the ProductRepository: namespace PcmagasFirstModuleBlockMyList; class MyList extends MagentoFrameworkViewElementTemplate { private ProductRepository $productRepository; public function __construct( TemplateContext $context, ProductRepository $productRepository, array $data = [] ){ $this->productRepository=$productRepository; } public function getRelatedProducts() { /** * @var String[]… Read More »How I can get products using multiple skus?

Magento 1.9 – Is it save to delete all categories associated with products with ‘parent_id’ equals 0?

In a custom module in Magento 1.9 I was associating products to categories using the following method: public function addProductToCategory($productId, $categoryId) { $category = Mage::getModel(‘catalog/category’) ->setStoreId(Mage::app()->getStore()->getId()) ->load($categoryId); $productsInCategory = $category->getProductsPosition(); $productsInCategory[$productId] = 1; $category->setPostedProducts($productsInCategory); $category->save(); } But, as you can… Read More »Magento 1.9 – Is it save to delete all categories associated with products with ‘parent_id’ equals 0?

Edgevirt withdrawing services

Edgevirt, not even two years old and advertising services on WHT as recently as this month will be “disabling services over the next 14 – 21… | Read the rest of https://www.webhostingtalk.com/showthread.php?t=1902788&goto=newpost