Depending on the Hyvä version you use, configurable product options may not be preselected when opening a product URL that includes option parameters such as size or color. For example, a link might look like this: https://Ihredomain.com/product.html#159=227&146=174 The issue does…
PayPal Express button not working on Hyvä product pages (Magento 2)
Depending on your version of Hyvä, the PayPal Express button on product pages may not work. The error message is We can’t initialize Express Checkout bzw. We could not initialize the express checkout . To fix this, override vendor/hyva-themes/magento2-default-theme/Magento_Paypal/templates/express/shortcut_button.phtml in…
Removing the SKU from the product page (Magento 2)
To remove the product SKU from a Magento 2 product page, open the file catalog_product_view.xml in your Magento theme and add the following line to the <body>…</body> Bereich hinzu:
|
1 |
<referenceBlock name="product.info.sku" remove="true" /> |
Product page tabs missing in Magento 2.4.5 or later
After upgrading to Magento 2.4.5 or later, product detail tabs may disappear for newly created products. Fortunately, this can be easy to fix. During an upgrade, Magento may update the product page design. Open the affected product and find the…
Selecting a custom product page template (phtml) (Magento 1)
To use a custom template for your product page, create the template file and then specify the following layout update in the product’s layout section: catalog/product/view-individuell.phtml catalog/product/view/media-individuell.phtml
Adding the compare list link to the product page (Magento 1)
The Magento compare list link is shown on the category page by default. Using the following code you can add it to the Magento product page as well.
|
1 |
<a href="<?php echo Mage::helper('catalog/product_compare')->getAddUrl($_product);?>">link text</a> |
How to know if you are on the product or category page (Magento 1)
YOu want to know if you are on either the product or category page? The following code might help:
|
1 2 3 4 5 |
$controllerName = $this->getRequest()->getControllerName(); $isCategoryPage = $controllerName == 'category' ? true : false; $isProductPage = $controllerName == 'product' ? true : false; if(...) |
Removing “in stock” / “sold out” from the product page using CSS (Magento 1)
Add the following CSS to youe themes CSS file and the “in stock” / “sold out” information will not be shown on the Magento product page.
|
1 2 3 4 |
.availability.in-stock, .availability.out-of-stock { display: none; } |