You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Arindam Kesh <ar...@yahoo.com> on 2013/02/15 08:21:11 UTC

Catalog Manager: How to add a link for file download, to a Product?

Hi,

I have created a product using Catalog Manager UI and I am 
able to see the product in http://localhost:8080/ecommerce. Now I want 
to add a hyperlink to the product page. Using this hyperlink, I should 
be able to download a certain PDF document from the Ecommerce page. How do I do that?

Please help.

Regards,
Arindam

Re: Catalog Manager: How to add a link for file download, to a Product?

Posted by Arindam Kesh <ar...@yahoo.com>.
Thanks for your reply, Rishi.

I am trying out the 2nd scenario. There is an existing (fixed) PDF, which a user should be able to download from a specific Product's page (Ecommerce).

Can you please list out the steps that I need to do for this. Can this be done using the Catalog Manager UI, or do I have to make some changes to files like contoller.xml?

Regards,
Arindam

--- On Fri, 15/2/13, Rishi Solanki <ri...@gmail.com> wrote:

From: Rishi Solanki <ri...@gmail.com>
Subject: Re: Catalog Manager: How to add a link for file download, to a Product?
To: user@ofbiz.apache.org
Date: Friday, 15 February, 2013, 1:36 PM

Hi Arindam,

Probably you are looking for one of theĀ  two options below;
1) System generates pdf on the basis of passed parameters to it. That means
see the orderheader.ftl in specialpurpose component, you will find anchor
tag for order.pdf which takes orderId as parameter. If you trace the
order.pdf request thru ecommerce controller then you find OrderPDF as its
view which set view-map.content-type="application/pdf".

2) You store a fixed pdf of product as content of that product and then
want to access it. That means see the controller of the ecommerce in
special purpose you will find a request as ViewSimpleContent, you can use
this request by passing the contentId in parameter, after click this will
automatically open the download window.

You can see many examples in *.ftl and *Forms.xml.

I hope it helps!

--
Rishi Solanki


On Fri, Feb 15, 2013 at 12:51 PM, Arindam Kesh <ar...@yahoo.com>wrote:

> Hi,
>
> I have created a product using Catalog Manager UI and I am
> able to see the product in http://localhost:8080/ecommerce. Now I want
> to add a hyperlink to the product page. Using this hyperlink, I should
> be able to download a certain PDF document from the Ecommerce page. How do
> I do that?
>
> Please help.
>
> Regards,
> Arindam

Re: Catalog Manager: How to add a link for file download, to a Product?

Posted by Rishi Solanki <ri...@gmail.com>.
Hi Arindam,

Probably you are looking for one of the  two options below;
1) System generates pdf on the basis of passed parameters to it. That means
see the orderheader.ftl in specialpurpose component, you will find anchor
tag for order.pdf which takes orderId as parameter. If you trace the
order.pdf request thru ecommerce controller then you find OrderPDF as its
view which set view-map.content-type="application/pdf".

2) You store a fixed pdf of product as content of that product and then
want to access it. That means see the controller of the ecommerce in
special purpose you will find a request as ViewSimpleContent, you can use
this request by passing the contentId in parameter, after click this will
automatically open the download window.

You can see many examples in *.ftl and *Forms.xml.

I hope it helps!

--
Rishi Solanki


On Fri, Feb 15, 2013 at 12:51 PM, Arindam Kesh <ar...@yahoo.com>wrote:

> Hi,
>
> I have created a product using Catalog Manager UI and I am
> able to see the product in http://localhost:8080/ecommerce. Now I want
> to add a hyperlink to the product page. Using this hyperlink, I should
> be able to download a certain PDF document from the Ecommerce page. How do
> I do that?
>
> Please help.
>
> Regards,
> Arindam

RE: Catalog Manager: How to add a link for file download, to a Product?

Posted by Praveen Agrawal <pa...@salmonllc.com>.
Hi Arindam,

To download a pdf file you just need to add a request in controller and inside view-map entry set the type as "screenfop", content-type as "application/pdf" and encoding as "none".

Now in Screen widget section you have to add '.fo.ftl' template under <xsl-fo> </xsl-fo> tag.

You can take reference from http://bigfish.salmonllc.com/bfDemo.html.

In admin module go to the 'Customer' section and search for a customer. Then take the mouse over to tools icon(very right in list) and click on 'Export Customer To Pdf' link. It will allow you to download a customer pdf file.

Hope it will help you! Please feel free to ask any query.

Thanks,
Praveen Agrawal
pagrawal@salmonllc.com


-----Original Message-----
From: Arindam Kesh [mailto:arindamkesh@yahoo.com] 
Sent: Friday, February 15, 2013 12:51 PM
To: user@ofbiz.apache.org
Subject: Catalog Manager: How to add a link for file download, to a Product?

Hi,

I have created a product using Catalog Manager UI and I am able to see the product in http://localhost:8080/ecommerce. Now I want to add a hyperlink to the product page. Using this hyperlink, I should be able to download a certain PDF document from the Ecommerce page. How do I do that?

Please help.

Regards,
Arindam