cancel
Showing results for 
Search instead for 
Did you mean: 

load (render) product view for use in popup

load (render) product view for use in popup

 

fairly new to magento, i created mij own module and did some effective programming.

in a nutschell the code helps deciding which product suits best.

so, now i want to present the suggested product in a popup, including the obvious "add to cart" functionallity.

In my controller i am at the point where i have the product.

now i want it to be rendered into HTML (to parse to the popup) like most "view.phtml" do.

I prefer not to have mij own copy of a view.phtml though (if  at all possible)

 

My main issue seems to me the creation of the object off the correct(!) class (i.a. product view) 

or might i need to create another block and controller and then ....

Any suggestions?

 

 

 

 

 

 

2 REPLIES

Re: load (render) product view for use in popup

Hi @Wiebrand L,

 

For your requirements, you need to use ajax with prototype. In your controller, you get all the product data. Then make the html according to your requirements and return that html. With Success request, you need to display the result in popup.

Found something useful, please give "Kudos" or "Accept as Solution" for Token of Appreciation.
Free Magento Extensions : https://magecomp.com/free-magento-extensions.html

Re: load (render) product view for use in popup

 

Hi,

Thanks for your suggestion, though i'm not sure what it means.

Why would i need to use AJAX to retreive the data?

Note: i (the controller) allready got he data (object)

I can output its pictures, texts etc, but how do i do that structured like the active product view?

 

quote: "Then make the html according to your requirements and return that html"

Here lies my boggle. How do i transform this data into HTML/Java in the same way the regular product-view would do that?

 

I still got no clue!