Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Questions related to Magento product collections.
4
votes
2
answers
883
views
Magento1.9 - select products with similar price from product categories
Given a $product, I need to get a random collection of 10 products belonging to the same categories of $product with a similar price - let's say +-15% the price of $product.
My idea is to get all pro …
1
vote
Accepted
Magento 2 - productCollection to json
Not sure if it's the correct/best way, but after some researches I got it working as follow:
$collection_to_encode = array();
// this is needed to get image URL
$imagehelper = $objectManager->create …
0
votes
1
answer
1k
views
Magento 2 - productCollection to json
In a .phtml template file I have loaded a productCollection using objectManager as follow:
$productCollection = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\Collection');
$valu …