Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 10 of 10

Thread: Uploading PDF Spec Sheets

  1. #1
    Windsun is offline Junior Member
    Join Date
    Apr 2009
    Posts
    20

    Default Uploading PDF Spec Sheets

    We have a lot of products with PDF spec sheets, and in some cases MSDS PDF files.

    Is there a simple way to upload those and/or treat them like an iimage to link to for each product?

  2. #2
    DotNetDevelopments is offline Senior Member
    Join Date
    Jul 2008
    Location
    Harlow / Essex / UK
    Posts
    619

    Default

    Interesting post... we have exactly the same problem.

    On our old site (before ADNSF) about the only good thing it did do was display a PDF icon on the product page when there was a ProductID.PDF in a PDF directory.

    We're just in the throws of upgrading to v8 and will be adding this functionality back in so we'll keep you updated.
    =====
    Version (Code/DB): AspDotNetStorefront MSx 9.1.0.1/9.1.0.0
    Execution Mode: 64 Bit
    Dot Net Developments - E-commerce By Experience

  3. #3
    Windsun is offline Junior Member
    Join Date
    Apr 2009
    Posts
    20

    Default

    This is something that we kind of need - while we can manually upload them and make a link on the product page, that is pretty much a kludgey way to do it.

    That is what we have to do now on our old primitive store, and is one of the things we were trying to get away from.

    With the prevalence of PDF files nowadays, you would think that most carts would have something like that, but very few do.

  4. #4
    DanV's Avatar
    DanV is offline Ursus arctos horribilis
    Join Date
    Apr 2006
    Posts
    1,568

    Default

    We support HTML-based spec sheets by uploading productid.htm into the description/productspecs folder on the site, in which case they will be picked up and displayed (or linked). PDF files are not specifically supported in this manner, but it would be a dirt simple mod to make...

    There is one block of code in ProductSpecs.cs that would need to be modded:

    Code:
    		private bool FindIDFile()
                         ...
    				// try skin (NULL) path:
    				m_URL = Path.Combine(m_Root,m_ProductID.ToString() + ".htm");
    				m_FN = CommonLogic.SafeMapPath(m_URL);
    				if(CommonLogic.FileExists(m_FN))
    				{
    					return true;
    				}
    Just change that to look for PDF files instead.

  5. #5
    btappan is offline Senior Member
    Join Date
    Jan 2008
    Posts
    148

    Default

    where is the ProductSpecs.cs file? Do I just replace the HTM with PDF ?

  6. #6
    btappan is offline Senior Member
    Join Date
    Jan 2008
    Posts
    148

    Default

    Also, how do I make the spec link pop up window resizable ? it is static right now and is too small.

  7. #7
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    If you're using v.8.x, the ProductSpecFile.cs should be inside the ASPDNSFCore. It's in the ASPDNSFCommon for v.7.x. Yes, you simply replace the .htm with .pdf on the FindIDFile method. Manually place the PDF file in the root folder afterward. Then specify the complete filename of the PDF on the SpecTitle and SpecCall fields under the Options tab of the Product Management page. It should display similar to this image.
    Attached Images Attached Images  

  8. #8
    btappan is offline Senior Member
    Join Date
    Jan 2008
    Posts
    148

    Default

    thanks for the file location, Is that also where I can set the popup window size, I don't use the inline spec sheet and the popup window is a fixed size and can't be adjusted.

  9. #9
    btappan is offline Senior Member
    Join Date
    Jan 2008
    Posts
    148

    Default

    Is that file location only available if you have the source code? I don't think I do. Where can I define the popup window size? Is there a workaround I can impose just through the xml package?

  10. #10
    tom.hundley is offline Junior Member
    Join Date
    Nov 2009
    Posts
    11

    Default Scroll bars for Spec popup

    Hi.

    It looks like it's been awhile since you posted your question about the size of the spec window, but I had the same question recently and thought I'd post my solution to help everyone out in case it wasn't posted elsewhere (I didn't seem to find it).

    Problem:
    I added spec files and the popup window was too small and had no scroll bars.

    Solution:
    In version 8.0.1.2 ML, this code can be found in AspDotNetStorefrontCore/XSLTensionBase.cs line 2761 (unmodified). The method is public virtual string ProductSpecsLink(String sProductID, String sShowSpecsInline, string sSpecTitle, string sSKU, string sSpecUrl),

    You simply need to add "scrollbars=yes" here:
    Code:
                //If product has spec or url, add a link for new window for the custom html depending on the specurl
                if (ProductHasSpecs || SpecUrl.Length > 0)
                {
                    results.Append("<a href=\"javascript:void(0);\" onClick=\"window.open('" + SpecUrl + "', 'null', 'scrollbars=yes,height=600,width=500,status=yes,toolbar=no,menubar=no,location=no');\">" + SpecTitle + "</a>\n");
                }
    I didn't see a way to do this in the XML template or for those of you without the source code, but I didn't look that hard either. Adding this tag solved my problem and I now have scroll bars.

    If there is another way to do this without modifying code, I'd love to see it.

    Hope this helps,

    Best regards,
    Last edited by tom.hundley; 01-08-2010 at 11:48 AM.
    Tom Hundley

    Elegant Software Solutions, LLC
    Managing Consultant
    http://www.elegantsoftwaresolutions.com
    http://www.totalcarewebsites.com