v12 Merchant Product Fields

Questions and answers about ShopSite Custom Templates

v12 Merchant Product Fields

Postby bkerns » Wed Nov 20, 2013 9:20 pm

Questions:
Is there a way to get at individual product options for formatting in the cart, confirmation, thankyou, emails ect?
Also, how do I get the product options to appear in the customer's confirmation email?

Is there anyway to get at the string containing product options either finopt, freeopt or :merchant methods? All three seem to work the same way, they each dump into a single name value pair and display in a set format. If you use a combination of methods, you can either display all or none. All of the formatting for the string appears to be hard coded in [-- SC_Cart --] either in a text area freeopt, or | delimited finopt and merchant.

This is the only documentation I can find on v12 Merchant Product Fields:
http://www.shopsite.com/templates/cookbook/product16-textentryfielddivided.shtml#424

Consider my form using the new v12 NAME="[-- PRODUCT.RecordNumber --]:merchant" method that I am trying to get to work with ShopSite: http://www.intint.com/shop/Tucson-Kennel-Club-Greater-Sierra-Vista-Kennel-Club_moreinfo.html

Click "Add To Cart" and you can see what I am up against. I doubt my client will buy it. I have tried to put some HTML i.e. <BR> in the values and they do parse in the cart but what I really need is to have the string available so I can process it with a call

[-- CALL formatmerchopt.cgi{([-- PRODUCT.Merchant Text--])} --] or inline php. Something like the string for
[-- PRODUCT.OptionFiniteText --] Then I could customize what options are displayed when and where and formatted.

I think Custom Checkout fields work this way, but I believe they are per order, not per product which is what I need. Ideally, it would be great to have 50 or so Custom Product Fields like the Custom Checkout Fields where I can display each.

If anyone has any ideas or even vendors that can deal with a product having many options 30+ please let me know.

Thanks in advance.
-Brian
bkerns
 
Posts: 16
Joined: Wed Nov 20, 2013 2:07 pm

Re: v12 Merchant Product Fields

Postby Jim » Thu Nov 21, 2013 11:05 am

The "merchant" field was added in ShopSite 12. It was added to give the merchant input fields that would could be submitted with an order, and appear on the merchant copy of the order, but would not necessarily be displayed on the shopping cart screens or on the shopper's receipt. This give them the option of adding specific instructions that they might need when assembling a product that aren't something the shopper needs to see. You can turn on this feature and enable it to be displayed on the shopping cart screens from the Commerce Setup > Order System > Shopping Cart screen in the field Merchant Product field.

I don't understand entirely what you want to do on your page. It looks like you are creating an entry form for a dog show. The shopping cart displays the fields that were on the form along with the information that was in the field. What information do you not want to display on the shopping cart, or is it just that you want it to look different?
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: v12 Merchant Product Fields

Postby bkerns » Thu Nov 21, 2013 12:18 pm

Thanks for the response! It is nice to know someone cares. It is for dog show event entries, there will be hundreds of events all with different values for the various category drop-downs. I intend to have the products generated client side from access, uploaded into shopsite and have the totals calculated with javascript via the state of several of the drop-down fields. All that stuff I have a pretty good handle on.

Yes, I would like to change the way they look. I was unaware that was the purpose of the merchant fields. Good to know. I suspect that if I convert the form's fields to finopt, they will appear on the customer's email? I don't think you can use finopt AND merchant show the finopt on the cart but not the merchant. If you turn on the show options in cart, it will show all of the product options used merchant, finopt, freeopt. I would like to show only Name of dog and its registration number and the show dates in the cart for each product, preferably in an HTML table. For the confirmation screen and emails, I would like to show all of the data in a table for each product.

Currently, the product options just print out in a long string with the values delimited by a '|'. The reason you are seeing them with <BR> and the name of the field on my cart is that I am inserting the chars in the value string. Not a problem with select, radio or checkbox, but text fields I will have to process on submit with javascript to add the extra chars to each of the values. Also makes the data in that field a little clunky for download and import into access. That I can work around.

Ideally, I would like to format the fields and mark them up individually with styles or simple html. Do you have any ideas? It looks like the finopt string is printed to a javascript variable ss_finite_options[0] where the array item is the product (I read on one of the posts here on the winegiftclub.com) I could maybe set a div below [-- SC_Cart --] and format a copy of that string and display via inner html. Problem is I can't get at between each product in the cart with [-- SC_Cart --] tag unless it sets an ID for that table cell. Not even sure if that will work on the customer and merchant's emails though. Do you know the purpose of that var? Is it what is being displayed in the cart or is it hard coded into the page?

I have a lot invested in ShopSite as a developer for this project and going forward, I just need to get over this one hurdle to commit to ShopSite for this project. I saw that there was someone else on this board that was interested in event entry for a marathon or something and were after something similar for their event registration.

Thanks,
-Brian
bkerns
 
Posts: 16
Joined: Wed Nov 20, 2013 2:07 pm

Re: v12 Merchant Product Fields

Postby Jim » Thu Nov 21, 2013 4:51 pm

I haven't had much time to look at this today so don't have a lot of answers. Here is what I do know.
There is no way to get at individual products in the shopping cart, the [--sc_cart--] outputs all products in cart as a single block. You can change the order of the columns in the table by using the more complete tag [-- SC_Cart delete quantity image name sku price total --]. Using that tag you can change the order of fields or delete some if you don't want them to display.

freeopt and finopt will always be displayed in the shopping cart

merchant fields can be enabled to display in shopping cart, checkout, confirmation and thank you screens or they can be disabled for displaying on those screens. There is no way to have them display on some but not others of the screens.

I don't know javascript so don't know what all is possible but in a Pro level store there are numerous javascript variables that you might be able to use to format some information outside of the actual cart product table.

I couldn't see any html tags other than <td> around the area where the merchant fields are displayed so I don't know if it would be possible to do any css styling of the data .

Hope that gives you something to go on. I'll try to do some testing tomorrow and see if I can figure anything else out.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 10 guests

cron