How to format <OptionMenus> and <MenuItem> for X

General ShopSite user discussion

How to format <OptionMenus> and <MenuItem> for X

Postby kelsey@richmondrc.com » Thu Apr 02, 2009 1:08 am

Question 20090402_0026:

Question - How to format <OptionMenus> and <MenuItem> for XML upload?

Background:

We are generating Products XML successully and have now tried to add <OptionMenus> and <MenuItem> tags.

Used the backoffice GUI to set up one example of OptionMenus which tested out OK in the store product page and in the cart. Then downloaded the XML from ShopSite and got the following (snippet) to use as a sample to mimic.

<ProductDescription>thisandthat $SAVE$</ProductDescription>
<OptionText>blahblah</OptionText>
<OptionMenus>
<Menu>
<MenuItem>Standard Pricing</MenuItem>
<MenuItem>SAVE $65.00 when you purchase this item on Wednesday; -65.00</MenuItem>
</Menu>
</OptionMenus>

Used our internal routine to then build Products XML at our end and uploaded the following (snippet):

<ProductDescription>thisandthat $SAVE$</ProductDescription>
<OptionText>blahblah</OptionText>
<OptionMenus>
<Menu>
<MenuItem>Standard Pricing</MenuItem>
<MenuItem>SAVE $65.00 when you purchase this item on Wednesday; -65.00</MenuItem>
</Menu>
</OptionMenus>

Looks the same as the download from ShopSite but does not work. The tags seem OK but they overwrite the example with blank contents for <OptionText> <OptionMenus> and both <MenuItem> hence suspect that the tags are OK but the content of the tags is causing trouble during the dbupload.cgi or generate.cgi process.

Workarounds attempted:

Not successful: Shortening the text.
Not successful: Adding ; 0.00 after Standard Pricing
Not successful: Changing the spacing between ; and -65.00
Not successful: Using the GUI Utilities to upload the XML and then Publish the store.

Further information:
ShopSite® Pro 10 r6.1
kelsey@richmondrc.com
 
Posts: 21
Joined: Sat Dec 13, 2008 11:37 am
Location: Delta, BC

Postby dortchjm » Thu Apr 02, 2009 10:47 am

First create a sample product maually through ShopSite, then download that product so you have a template or guide. It can get confusing because you have to enter |n| between each entry. Your code for Option Menu Text should end up looking something like: Standard Pricing|n|SAVE $65 when you purchase this item on Wednesday;-65.00

Janice
dortchjm
 
Posts: 119
Joined: Tue Jan 29, 2008 9:24 pm

Postby kelsey@richmondrc.com » Thu Apr 02, 2009 12:40 pm

Thanks for your feedback.

Your suggestion re doing one by hand and then using that as a template is a good one. Please see the Background info re how we did do that and the results.

As to using | (pipe), this does work for uploading a txt file for example but not for XML. Per the Database Upload GUI, | is not used for XML and the XML documentation does state that a MenuItem tag set is needed for each Menu Item. We did however give the | a try in the XML and it did not work so the documentation seems correct with regards to the need for | in the XML.

Any other ideas folks?

Thanks Again.
kelsey@richmondrc.com
 
Posts: 21
Joined: Sat Dec 13, 2008 11:37 am
Location: Delta, BC

Postby swsnow » Thu Apr 02, 2009 1:09 pm

Are you able to export the <OptionMenus> content through an automated XML download (db_xml.cgi)?

I have been unable to export this field using any of the following combinations (though the XML download through the backend GUI works fine through dbextract.cgi):

Option+Menus+Text (as specified by the manual)
Option Menus Text
OptionMenusText
OptionMenus
Option+MenusText
OptionMenus+Text
Option+Menus
(and many more...)

The only workaround I could find was to create and utilize a fieldmap--this fixed the problem for me on download--but would not be a workaround for a database upload.

Steven
swsnow
 
Posts: 3
Joined: Thu Apr 02, 2009 12:44 pm

Postby kelsey@richmondrc.com » Thu Apr 02, 2009 1:30 pm

Have not tried db_xml.cgi but the GUI driven Utilities > Database > Download > XML does produce an XML export for us with those tags OK.

Per the background example outlined above, we can produce the same XML for uploading and it does upload OK but when Generated thereafter that tags are there but with no content.

Thanks much for your input.
kelsey@richmondrc.com
 
Posts: 21
Joined: Sat Dec 13, 2008 11:37 am
Location: Delta, BC

Postby Jim » Thu Apr 02, 2009 1:56 pm

If you view the product after an upload are the appropriate fields filled in? Generate will not remove data from the database but unless your template is designed to display it you won't see it on store pages.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby dortchjm » Thu Apr 02, 2009 3:06 pm

Sorry, I'm used to doing .txt uploads. I knew XML was an Excel extension and use Excel to make my changes, then copy the data to Notepad to upload it. I haven't tried uploading the way you're trying to do it.

Janice
dortchjm
 
Posts: 119
Joined: Tue Jan 29, 2008 9:24 pm

Problem Resolved re OptionText and OptionMenus

Postby kelsey@richmondrc.com » Sun Apr 05, 2009 6:30 am

Thanks to everyone who chipped in with suggestions and feedback. With help from the folks at Radiant Communications (www.radiant.net ShopSite hosting) and ShopSite Technical Support we found that we had errors in our Products XML. Specifically we had multiple OptionText and OptionMenus elements for the same product. It's worth noting that ShopSite uses the first occurence of the duplicate tags rather than the last which in our case meant that empty tags were prevailing. Dickens of a thing to find and without tips from ShopSite Technical Support we would not have known what to look for. Thanks Loren!
kelsey@richmondrc.com
 
Posts: 21
Joined: Sat Dec 13, 2008 11:37 am
Location: Delta, BC


Return to User Forum

Who is online

Users browsing this forum: No registered users and 35 guests

cron