Announcement

Collapse
No announcement yet.

Custom Field Image Upload

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Custom Field Image Upload

    Is there more info on how this Custom Field works? Can it also be used to upload a PDF file if it's in the Upload Settings? I'm trying to figure out what the output of the token would be if used.

    Thanks!
    Leslie
    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

    #2
    Re: Custom Field Image Upload

    Hey Leslie -

    Yes this field can be used to upload any file type you allow under domain settings ( then Image Upload Settings). It will always be uploaded to the /0000001/graphics/ folder but it will support any extension you permit.

    From the admin perspective when you have a custom field of type image upload, it will display a file upload dialog box. Select the file you want and hit upload. This will upload it to the server into the graphics folder and store the path in the custom field. (It works identical to how thumbnail and fullsize image uploads work)

    Then to display it on the front end of the website you access it like you would any other custom field.

    Using the new custom field functions it would look like this:

    Code:
    //this will read a custom product field using the product code, and save the value to a variable named l.settings:filepath
    <mvt:item name="customfields" param="Read_Product_Code(l.settings:product:code,'custom-field-code', l.settings:filepath)" />
    
    
    //display a link the the pdf
    <a href="&mvte:filepath;" target="_blank">View PDF</a>
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment

    Working...
    X