이것은 내 Volusion 항목 삽입 방법입니다.이 방법은 HTTParty gem for rails에 의존합니다. <PhotoURL_Large>
및 <PhotoURL_Small>
XML 태그를 사용하여 사진이없는 항목을 게시하고 사진 한 장으로 항목을 게시하는 데 적합합니다.API를 통해 Volusion에 여러 사진을 업로드하는 방법
def self.post_volusion_item(hide_product, product_code, product_name, product_description, availability, custom_field1, custom_field2, enable_options_inv_control, free_shipping_item, height, length, width, metatag_description, metatag_title, photo_alt_text, photo_xml, product_category, product_price, product_weight, metatag_keywords)
encrypted_password = ENV['VOLUSION_PASSWORD']
post_url = "https://WEBSITE-HERE/net/WebService.aspx?Login=LOGIN-HERE&EncryptedPassword=#{encrypted_password}&Import=Insert"
body = "<?xml version=\"1.0\" encoding=\"utf-8\" ?><Volusion_API><Products><HideProduct>#{hide_product}</HideProduct><ProductCode>#{product_code}</ProductCode><ProductName>#{product_name}</ProductName><ProductDescription>#{product_description}</ProductDescription><Availability>#{availability}</Availability><CustomField1>#{custom_field1}</CustomField1><CustomField2>#{custom_field2}</CustomField2><EnableOptions_InventoryControl>#{enable_options_inv_control}</EnableOptions_InventoryControl><FreeShippingItem>#{free_shipping_item}</FreeShippingItem><Height>#{height}</Height><Length>#{length}</Length><Width>#{width}</Width><METATAG_Description>#{metatag_description}</METATAG_Description><METATAG_Title>#{metatag_title}</METATAG_Title><Photo_AltText>#{photo_alt_text}</Photo_AltText><PhotoURL_Large>#{photo_url_large}</PhotoURL_Large><PhotoURL_Small>#{photo_url_small}</PhotoURL_Small><ProductCategory>#{product_category}</ProductCategory><ProductPrice>#{product_price}</ProductPrice><ProductWeight>#{product_weight}</ProductWeight><METATAG_Keywords>#{metatag_keywords}</METATAG_Keywords></Products></Volusion_API>"
post(post_url, body: body)
end
항목에 여러 장의 사진이있는 문서를 찾을 수 없습니다. 전화를 복제하려고했습니다. 예 : <PhotoURL_Large>img1</PhotoURL_Large><PhotoURL_Small>img1</PhotoURL_Small><PhotoURL_Large>img2</PhotoURL_Large><PhotoURL_Small>img2</PhotoURL_Small>
이미지 업로드가 없습니다.
PhotoURL이 항목 사진의 URL과 관련이 없지만 Volusion의 항목 양식에있는 데이터에만 연결되어 있다는 것을 알고 있습니다.
누군가가 폭력 아이템에 대한 실제 사진 URL에 액세스 할 수있는 올바른 방향으로 나를 안내해 줄 수 있습니까?
설명 및 문서 링크를 이용해 주셔서 감사합니다. 그런 다음 사용자 정의 응용 프로그램에서 여러 사진으로 항목을 업로드하는 유일한 해결책은 API 호출로 항목을 게시 한 다음 올바른 파일 이름의 사진을 vspfiles/photos로 FTP하는 것입니다. –
당신은 Volusion에 아무것도 올릴 필요가 없습니다. 이전에 링크 된 문서에 표시된대로 올바른 제품 코드 접두사와 접미사가있는 이미지를 업로드하면됩니다. 이미지 파일의 이름이 올바르게 지정되면 제품이 자동으로 표시됩니다. 이것은 여러 대체 이미지와 견본 이미지뿐만 아니라 문서에 표시된 다른 모든 이미지에도 적용됩니다. – user357034