1

please help me to trigger out this issue. I am new in magento and hence really need your help.

I need to have two product view pages in magento. One for local products and another for international products. I have customized the default product view page in order to display local products.International product view page will be displayed, when I clicked on 'international product' link, which i had provided in the default product view page. I have created a fully functional module with name 'international' for international product. But now I am in utter confusion.

How can I make my custom module which should exactly function like the default product view page? Is it the proper way to make another product view page? Please provide me with your suggestions on this issue. Guide me properly.

2

Correct me if I'm wrong but what you want is:

Product is local -> show local product page

Product is international -> show international product page

So you don't need two product pages per product, you need two different versions of the same page.

To achieve this, I see three five ways:

  1. Just add a new theme to you package or add a new package, change the templates and define your product in the backend to use another package/theme.

    You theme might be here: app/design/frontend/default/mytheme/, then you want to define package as default, and default (the last option under theme) as mytheme, then you can define template as international and put everything you want to change in app/design/frontend/default/international and it should fallback to mytheme.

  2. You use the custom layout changes of the product to change the template or add a custom layout handle <update handle="custom_layout_handle"/>

  3. If I'm correct, 1. can be used on category level (which expects, that the local/international products are all seperated, and then inherited to all the products, but be careful, this inheritance only works if magento knows, that your product is in this category. So if you use a direct link to the product, per default, no category is set (afaik)!

    1. can be used on category level as in 3.
  4. Implement an observer to do the above things. Add a new attribute to the product local/international, check this attribute and then do 1. or 2. or change the templates for the different blocks directly.

| improve this answer | |
  • thank you so much for your reply. However, i don't have a product listing page. What I have done is, routing the users to local product view page from the home page, when user click on appropriate product option from home page. so my default product view page is set for local products. In that page, I have added a link, in order to access the international products. I need to display my international products then. I have added attributes to seperate the products. – Rajeev K Tomy Dec 10 '13 at 9:29
  • So you need the default product page for all products and a second page for the international products? Then I would say just built your own controller and implement a second page with a template like you need it. – Fabian Blechschmidt Dec 10 '13 at 9:31
  • yes.. that all i need. you mean i need to make a controller for my own module 'international'? – Rajeev K Tomy Dec 10 '13 at 9:34
  • yes, then you have your own layout_handle which you can then fill with your own block and your controller only needs public function indexAction() {$this->loadLayout(); $this->renderLayout();} – Fabian Blechschmidt Dec 10 '13 at 9:36
  • as i mentioned in my question, i have created a module for it. i have layout handle for it and i have even filered out the international product that i need to display. In order to display the product, i have create my own function 'getInternationaproduct()' in the block of my module. However i need to add now the addtocart block in my custom module. There is the problem. I have added the addtocart block which magento already using in catalog.xml into my layout_handle. However it seems to be not working – Rajeev K Tomy Dec 10 '13 at 9:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.