This is how you can load all crosssell products of a product: $crossSellProducts = $product->getCrossSellProductCollection() ->addAttributeToSelect(Mage::getSingleton(‘catalog/config’) ->getProductAttributes()) ->setPositionOrder()->addStoreFilter();
Loading all cross-sell products of a product (Magento 1)
Use this code to load all cross-sell products associated with a product:
|
1 2 3 4 |
$crossSellProducts = $product->getCrossSellProductCollection() ->addAttributeToSelect(Mage::getSingleton('catalog/config') ->getProductAttributes()) ->setPositionOrder()->addStoreFilter(); |
Getting a product’s manufacturer (Magento 1)
The following code retrieves the name of a product’s manufacturer. $manufacturer = $product->getAttributeText(‘manufacturer’);
Getting the type of a product (Magento 1)
Use the following code to get the type of a Magento product: // configurable, simple, … $type = $product->getTypeId();
Getting a product’s type (Magento 1)
Use this code to determine a product’s type (such as simple or configurable):
|
1 2 |
// configurable, simple, ... $type = $product->getTypeId(); |
Magento 2 error: Could not determine temp directory, please specify a cache_dir manually
If you get the Could not determine temp directory, please specify a cache_dir manually error in Magento 2, the shop is not able to access your PHP temporary folder. To solve this problem, simply add sys_temp_dir to your php.ini file…
Could not determine temp directory, please specify a cache_dir manually (Magento 2)
If your Magento 2 store displays the error Could not determine temp directory, please specify a cache_dir manually , Magento cannot access the temporary PHP directory. Fix this by setting sys_temp_dir in php.ini to a directory that your store can…
Running MageSetup in Magento 2
If you have installed MageSetup for Magento 2, you still need to apply it so that tax rules and other configuration data are created. Run the following command in the Linux shell to generate the MageSetup configuration:
|
1 |
php bin/magento magesetup:setup:run de. |
You can…
Generating CSS and JavaScript files manually for de_DE (Magento 2)
Sometimes JavaScript and CSS assets in Magento 2 are not loaded correctly. If you need to generate the JavaScript and CSS resources manually, you can do so from the Linux command line. The following command generates the files:
|
1 |
php bin/magento setup:static-content:deploy de_DE |
German language pack for Magento 2
Magento 2 is a powerful and fast ecommerce platform. Unfortunately, it does not come with German translations out of the box. With the Sprachpaket from Splendid can quickly provide the missing translations.