set different layout for different product type in magento? - magento

How can we set different layout for different product according to product type?
I want to show Virtual and Bundle product in different layout, simple and grouped will show in differ layout.
Thanks

Checkout catalog.xml file in layout folder of your theme.
There are several handles which might be useful for you:
catalog_product_view
PRODUCT_TYPE_simple
PRODUCT_TYPE_configurable
PRODUCT_TYPE_grouped
PRODUCT_TYPE_virtual
There you can try to change your rendering logic.

Related

joomla using virtuemart i want the description to be placed under products

I have a joomla site using virtue mart in my products. I want my description to be placed under the products. Any help would be appreciated.
You will see here that the description is above the products.
I have had a look through the source files but was wondering the best way to go about this as I may just be missing something.
I hope you are using , VM2.x Versions.
The the Product Details Page Source file you can found on the following path.
components\com_virtuemart\views\productdetails\tmpl\
The product description and short descriptions are included in the default.php layout.
If you want to change the description ordering simply change its position as per your requirement.
$this->product->product_s_desc and $this->product->product_desc;
If you are planning to change the default VM template style , I recommend to use Joomla Override Concept this way you can simply override the default template with your own.
Here you need to override productdetails view then simply like below.
copy all the files from components\com_virtuemart\views\productdetails\tmpl\ and paste this to , templates/your_template/html/com_virtuemart/productdetails/ If you unable to find this path inside your template folder you have to create that.
This will simply load your new layouts from template folder rather than default path.
Hope it clear for you..
The VM Template system also lets you create additional view templates for categories and products. To override the default categories, category, or productdetails view, simple use the standard Joomla template override method. Copy /components/com_virtuemart/views/[categories, category, or productdetails]/default.php to /templates/[Your Template]/html/com_virtuemart/[categories, category, or productdetails]/default.php and make your changes to the template version of default.php.
To create additional views that can be set on a per category/product basis, simply copy /templates/[Your Template]/html/[categories, category, or productdetails]/default.php to a new file name like /templates/[Your Template]/html/[categories, category, or productdetails]/myView.php and make the desired changes. In the Virtuemart category or product configuration, you will find myView in the drop down list of alternatives views that can be used.

Different product page layouts on different stores with magento multi-store

So here is my quandry..
I have three stores all with seperate themes.
I want the actual layout of the product page to vary between stores. So for instance I would like to include full description on one and only short descitopn on the other and would like to add a tag line field in another. Basically all three will need complete sepearate layouts.
I think the product page layout is drawn from app/design/front/base (as a standard layout).
Can I include the relevant files (and directories) from base into app/design/frontend/default/theme to allow me to achieve the above?
I think the file I need to edit/copy is the view.phtml? Can you confirm this also?
You need to also copy catalog.xml to related theme of store. If want to remove description or add other details of products.
you have to copy view.phtml to related theme of your store and modify/add/delete the code in view.phtml
to remove anything just comment the code in view.phtml file.

How to remove information in Magento catalog, but only for specific product type

I am wondering how can I delete this two divs -
in Magento catalog, but only for specific product type. In short, I would like to have product type which would appear in catalog only with product-image and product-name, without - price, Out of stock, Add to Wishlist, Add to Compare.
It's possible to load different layout updates depending on loaded product type. You can see an example of how it's done in Magento for configurable products here: https://github.com/LokeyCoding/magento-mirror/blob/magento-1.7/app/design/frontend/base/default/layout/catalog.xml#L275-L287
It's possible because view action of product controller makes this to be executed: https://github.com/LokeyCoding/magento-mirror/blob/magento-1.7/app/code/core/Mage/Catalog/Helper/Product/View.php#L59-L60
You can change the design for any product from the admin.
You need to create a separate theme with a different product page which will have only the attributes you would like.
Then you can select the design for that specific product. Please see the screenshot, how you can change design for any product

Different product image per category in Magento

I have a large store with many products showing in multiple categories.
Inside each of these categories the product has a different use, so I would like to show a different image.
I would use a bundle / grouped product however the default simple product has custom options.
Any PHP or set up suggestions would be appreciated.
A clean implementation would be to add a new attribute to the media/gallery functionality (akin to label/sort-order).
Then you would add a drop-down category selector to the grid view on the "Manage Product > Edit Product > Images" tab.
Then from there, you could extend the standard collection for category/search to select your image with corresponding category ID (instead of the default selected thumbnail).
But you certainly are not going to find a 1-liner to pull this off (cleanly).

Magento - Show same item with different colors underneath the item

i’m new to magento and was wondering if someone can help me.
i have a product that comes in multiple colors, but if i set it up as a configurable product it just gives the user the option of choosing a different color (but doesn’t show an image to him/her)
what i would like to do is have the other colors appear underneath just like up sells would (the same design)
if anyone can help me i would greatly appreciate it
Use the Simple Configurable Products extension by Organic Internet, as available for free on Magento Connect and your problem should be solved.
One way to accomplish this is to store images for each color of the project. With JS, you could auto-select color options on the page, and still make use of a configurable product for this purpose. You'll need to do significant template alteration to make this work.
Another approach is to use simple products (which you've already created in this case), and list them directly in the catalog. With Magento's cross-sell functionality, you can tag the products to each other and provide links between product pages for each color. Obviously, this involves more navigation for the user, but does allow you to manage each product independently.
Both of these methods will retain normal product relationships and track inventory for each color of a product, so they are preferable to solutions that involve hacking the framework.
Hope that helps!
Thanks,
Joseph Mastey

Resources