46 votes
Accepted

call static block in view.phtml insted of phtml file

You can use the below code: in .phtml file : <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('block_identifier')->toHtml(); ?> sample : <?php echo $...
user avatar
  • 32.1k
33 votes
Accepted

Change standard quantity on product page from 0 to 1 (Magento 2)

--The easiest way is that we can change the input value from template: (override this template - not recommend) vendor/magento/module-catalog/view/frontend/templates/product/view/addtocart.phtml --...
user avatar
29 votes

Change product image for configurable products

The question is tagged with ce-1.7.0.2 but for future reference, if you are using ce-1.9.1.0 ee-1.14.1 or higher, the feature is already built in, with the so-called Configurable Swatches which allow "...
user avatar
21 votes
Accepted

Catalog Search: If only one result, show product view page insted of list view

You need to create a new extension that checks, before rendering the quick search (or advanced search) page if the product collection contains exactly one product. For this let's create a new ...
user avatar
  • 196k
15 votes

How to remove zoom from product details page on 1.9 RWD theme

Create an override of file /skin/frontend/rwd/default/js/app.js (for example in /skin/frontend/rwd/mystyle/js/app.js) comment the line (default line: 649): //image.elevateZoom(); Refresh the ...
user avatar
  • 151
14 votes
Accepted

Remove "product information, reviews, tags" block from product page

You should have to create local.xml file inside your frontend theme folder app/design/frontend/[your_package]/[your_theme] (if you haven't already) And insert the following lines there <?xml ...
user avatar
  • 3,985
14 votes

How to add "Buy Now" button in Magento 2.1 Product detail page along with add to cart?

Here is a module that adds a 'Buy Now' button that takes customer directly to checkout with the choosen product in cart. Module Directory: | registration.php | +---Controller | \---Cart | ...
user avatar
  • 8,819
10 votes
Accepted

How to remove zoom from product details page on 1.9 RWD theme

As mentioned in one of the other answers, the zoom feature starts in the createZoom function of the ProductMediaManager in /skin/frontend/rwd/default/js/app.js file. So, another option is to ...
user avatar
10 votes
Accepted

Using Magento 1.9.1 CE, ElevateZoom doesn't work on product page (Uncaught TypeError: undefined is not a function)

Found the solution! I originally tried @AreDubya's solution by making a custom .js file with jQuery.noConflict(); and making sure to include it in my local.xml with <catalog_product_view> ...
user avatar
  • 161
9 votes
Accepted

Add Review Form To Product Page Magento 1.9

You are going into the right direction, but you need to do some modifications: addToParentGroup and setTitle are used to show content in review so add this code below <action method="...
user avatar
  • 75.8k
9 votes

Magento2 : Set Product limit in Related and Upsell Product

You can also use the layout if you don't want to create a plugin. Assuming you have a theme "Vendor_default" and running Magento >= 2.1.2 Upsell Products: Create the file app/design/frontend/Vendor/...
user avatar
  • 190
9 votes

How to change div fotorama__stage height on product view page

You will have to override vendor/magento/module-catalog/view/frontend/templates/product/gallery.phtml file by putting it into app/design/frontend/Smartwave/porto/Magento_Catalog/templates/product/view/...
user avatar
8 votes
Accepted

Random products from same category with parent category fill up

I recently implemented something very similar and will share the relevant code below. But first some comments about performance, since that was the question: General thoughts on performance for your ...
user avatar
7 votes
Accepted

Remove block from group

You can do the following in your local.xml: <reference name="product.info"> <action method="unsetChild"> <alias>description</alias> </action> <...
user avatar
  • 5,570
7 votes

check if price is being displayed tax included

From what I can tell, you're trying to get the configuration setting which determines how Taxes are displayed in the Catalog in Magento. This setting can be found in System -> Configuration -> (Sales)...
user avatar
  • 511
7 votes
Accepted

How can I add a static block in product page before reviews?

If you have a lok at how the review tab has been added in review.xml of the rwd theme, you find: <catalog_product_view> <reference name="product.info"> <block type="review/...
user avatar
7 votes

Remove "product information, reviews, tags" block from product page

Admin Panel -> System -> Advanced -> Mage_Tag = "Disable"
user avatar
  • 179
7 votes
Accepted

Add Cross sell block on product page

Try this module: File : app\etc\modules\Rkt_CrossSell.xml <?xml version="1.0"?> <config> <modules> <Rkt_CrossSell> <active>true</active> ...
user avatar
7 votes

How to integrate ImageMagick to magento

You can install imagick "easily" if you have access to the server with, one of the following commands: pecl install imagick sudo apt-get install php5-imagick && sudo php5enmod imagick or you ...
user avatar
7 votes
Accepted

How to trigger self.openFullScreen() function into my custom jQuery in Product details page

After spending some time, i found the answer as mentioned below, hope this will help for someone. <script type="text/javascript"> require([ 'jquery', '...
user avatar
6 votes

How to create a different product page structure for specific products under a one category?

This might be the easiest solution possible. Create a new theme and only change the product view page structure in that theme. There's a configuration available in admin panel, which allows you to ...
user avatar
  • 9,857
6 votes

How to create a different product page structure for specific products under a one category?

Following solution is done by editing the custom layout update section of the relevant category. Edit yourTheme/template/catalog/product/view-recipe.phtml file to obtain the look you want for the ...
user avatar
  • 514
6 votes

How to get simple product id of configurable product on Product details page

I have select box at attribute of configurable product. This is what i have done to get simple product id. Put following code in your configurable product phtml file. require(["jquery"], function(...
user avatar
6 votes
Accepted

Guest can't create product programtaically [ similar to wishlist ]

what happens in wish list product , when a guest is adding a product to a wish list in the preDispatch method on controller they are checking whether the customer is logged in or not. If customer is ...
user avatar
5 votes
Accepted

Change order or tabs on product details page on Magento 1.9

Use the before or after tag in your block. Here is an official guide to achieve that. Example: <block type="cms/block" before="some-other-block" name="left.permanent.callout">
user avatar
  • 7,323
5 votes

How to create a different product page structure for specific products under a one category?

Your question is not clear. However if you are looking to customize a particular category, then it is very easy to dot that. Magento generates a specific layout handle for each categories. It will ...
user avatar
5 votes

Remove "product information, reviews, tags" block from product page

Create local.xml and paste the below code. <?xml version="1.0" ?> <layout> <default> <remove name="product_tag_list" /> </default> <layout>
user avatar
5 votes
Accepted

Adding new page to Front end

Problem resides in your layout update xml file, particularly in the following block declaration. <block type="abc_helloworld/index" name="helloworld_any_block" template="helloworld/index.phtml" /&...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible