custom field error message(s)

Questions and answers about ShopSite Custom Templates

custom field error message(s)

Postby matthew » Wed Aug 18, 2010 12:26 pm

Hello,
very new to shopsite, and e-commerce as well actually.

few questions and not sure about where to find the answers, neither is hosting company, so, could use some help.

Apologies if these are commonly asked, or already explained questions, did look and was unable to find it.

So,

have a shopping cart created using the custom template cookbook, custom shopping cart tutorial. (very helpful by the way, best thing seen, [once found])

For better reference, here is the address to this specific set-up:
http://www.ecstatic-birth.com/ecstaticBirthTele_Summit.html




from this entry page, if you scroll down and 'add to cart' and enter the shopping cart:

    How to remove the "SKU" from this table?


if you then select a payment option and continue to the next page, like to know:

    How and where to access the formatting options for the fields that are 'shopsite generated'?(my term)
    example, the Email field, First Name field, Last Name field, etc.
      Specifically, attempting to move the red asterisks from the end of the field name to the right of the actual field.
      Specifically, attempting to right align the field names to the left side of the fields to standardized the styling between custom fields and shopsite fields.


it's very possible/probable that I'm missing something further upstream...

Perhaps I should be aware of a way to simply "turn off" the shopsite generated fields altogether, and then be able to control the layout of all the fields together?...

This brings me to the next and final question, which is, where is the point of control for the custom field(s) error message formatting?

So, currently, if you as a visitor, don't fill out the required field "last name" which is a "shopsite generated" field you get an error message. If you as a visitor don't fill out the information on one of my custom required fields, you get a different error message.

Can you help me to get a better understanding of:

    why these are different?

    can they look/be the same?

    How to control the formatting for the error message for the custom fields?


I really appreciate any and all support/guidance you are able to offer.
thank you,
-matthew
matthew
 
Posts: 15
Joined: Wed Aug 18, 2010 11:14 am

Re: custom field error message(s)

Postby Jim » Wed Aug 18, 2010 1:04 pm

How to remove the "SKU" from this table?

For the SKU you will need to modify the tag [-- sc_cart --] as described in the help
http://shopsite.com/help/10.2/en-US/templates/custom.template.cheatsheet.sc.html
[-- SC_Cart --] The table showing the products ordered and the order subtotal
[-- SC_Cart delete quantity image name sku price total --] The table showing the products ordered and the order subtotal, with the fields in the order specified.

So it would be [-- SC_Cart delete quantity image name price total --] which will prevent the SKU from being displayed.

Note that in the shopping cart template there are multiple sections many of which contain the [-- sc_cart --] tag and you will need to change each of these so the SKU doesn't display on other shopping cart screens.


How and where to access the formatting options for the fields that are 'shopsite generated'?(my term)
example, the Email field, First Name field, Last Name field, etc.

Specifically, attempting to move the red asterisks from the end of the field name to the right of the actual field.

Which fields are displayed and some parameters such as if required and the field size are set on Commerce Setup > Order System > Checkout. (note that if you are using a payment gateway or 3rd party shipping method (UPS, USPS, FEDEX) some fields will be required even if you don't mark them as such and you don't check the display option the shopper may have problem.) I don't believe there is a way to move the * placement. However you could disable the display on the above backoffice screen. Using css you could highlight the required fields in some manner.
Specifically, attempting to right align the field names to the left side of the fields to standardized the styling between custom fields and shopsite fields.


The addresses (tables) for Billing and Shopping have css styles assigned to them which you can modify to right align the fields. Also each of the individual field has a default style which you could use to modify the way that field looks.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: custom field error message(s)

Postby matthew » Wed Aug 18, 2010 2:07 pm

Thank you Jim!
exactly what was needed.

the only other thing was,
is there a way to simply "turn off" all of the "shopsite generated" fields altogether, and then be able to control the layout of all the fields because they would then all be custom fields?...


Or is this what you were referring to in the note:(if you are using a payment gateway or 3rd party shipping method (UPS, USPS, FEDEX) some fields will be required even if you don't mark them as such and you don't check the display option the shopper may have problem)


Please note, we have no shipping, but we are using a payment gateway...

thanks again for your help,
-matthew
matthew
 
Posts: 15
Joined: Wed Aug 18, 2010 11:14 am

Re: custom field error message(s)

Postby Jim » Wed Aug 18, 2010 3:15 pm

In most cases it would cause problems if you were to leave out the ShopSite provided fields. They are used to validate some input (such as a somewhat valid email address, credit card numbers, state and country codes, etc). As I mentioned some fields are required in certain situations. However, if you can create the same form fields with the same name, value, etc in your template or through the custom checkout fields ShopSite might not be able to tell that it didn't create the fields.

ShopSite does however pre-populate the address fields with cookie information if the shopper has been to the store before or if they leave the billing screen and go back to the cart and come back to billing. So you would need to handle that type of information storage yourself if you don't use the ShopSite tags to output the form fields.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: custom field error message(s)

Postby matthew » Wed Aug 18, 2010 4:15 pm

Thank You again, Jim.

once again, apologies if this is all information that I've somehow missed in my searching for it.

this is great information and it leads right into the next obvious question from my client, which is,

if she navigates away from the page, the custom fields all lose the information that she has diligently entered.

Can I somewhere in shopsite control the "cookie information" for the custom fields? Is this type of functionality supported, or am i expected to handle this type of information storage myself? (a bit out of my comfort level currently, from the sound of it at least)

How and where am I able to control the appearance of the error message(s) presented if a required custom field is not filled out correctly?


thank you again for your time Jim,
-matthew
matthew
 
Posts: 15
Joined: Wed Aug 18, 2010 11:14 am

Re: custom field error message(s)

Postby Jim » Thu Aug 19, 2010 9:11 am

ShopSite does not do anything with custom fields. They are custom so the developer needs to handle any information in them including creating a cookie to keep them if the shopper leaves the page.

The custom template tag [-- ShopSiteMessages --] displays any message that need to be displayed that ShopSite knows about. If (Commerce Setup > Order System > Checkout ) Display Custom Checkout Fields is enabled and the Req box is checked for the field then ShopSite will display the Text Name value with the associated text message ("Please specify a valid value for the" on Preferences > Store Text > Messages). So the message will be something like "Please specify a valid value for the ---------- "

The actual style of the message would be controlled by the css assigned to the [-- ShopSite_messages--] tag which outputs something like
Code: Select all
<table class="thankyou_err" border="1" cellpadding="5" cellspacing="0">
<tbody><tr>
<td class="thankyou_err" bgcolor="#ffffcc">
<img src="http://blister.shopsite.com/sp2/shopsite-images/en-IE/msg/warning-yellow.gif" width="30" height="29">
</td>
<td class="thankyou_err" bgcolor="#ffffcc">
Please specify a valid value for the <br>&nbsp;&nbsp;&nbsp;&nbsp;Add Gift Wrap

<p>
</p></td>
</tr>
</tbody></table>

So you would need to define styles for thankyou_err .

As I mentioned there may be other things that ShopSite is counting on so deleting forms that ShopSite relies on may cause other issues.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: custom field error message(s)

Postby matthew » Fri Aug 20, 2010 8:30 am

Thanks Again Jim,
We decided to place all of her custom fields 'upstream' on a 'form page' and when the user has completed her form, they 'continue' into the first page of the shopping cart.

I'm just looking for that whole 'ease' of complete customization... need to launch the site, but it can't look like a 'back alley in a bad neighborhood' where we ask for their money either. As a designer working with a whole new product, it has been challenging to fully grasp my constraints so that I am then able to fully embrace them and produce creative solutions within them.

One more and I hope final question, Is it possible/easy to control the displayed result for a 'checked' custom check-box?
For example, I have a custom checkbox with a name of "field11" and an id of "I agree", but on the confirmation page the result is 'on'... my client would really prefer 'yes' or 'I agree'...

thanks for your help.
-matthew
matthew
 
Posts: 15
Joined: Wed Aug 18, 2010 11:14 am

Re: custom field error message(s)

Postby Jim » Fri Aug 20, 2010 9:26 am

This is really an html question rather than a ShopSite question but here is some information you might look at:
http://www.w3schools.com/html/html_forms.asp

Basically when a form is submitted if the checkbox is checked then a value is submitted, the default being "on". If the box is not checked nothing is submitted. So if you want the value for a check box to appear as "I Agree" you should have something like
<input type="checkbox" name="field01" value="I Agree"> I like html.
and if you set the field01 "Text Name" to Charge Me
If the box is checked you will see Charge Me: I Agree .
If the box isn't checked you will just see Charge Me:.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: custom field error message(s)

Postby matthew » Fri Aug 20, 2010 11:06 am

Thank you Jim!

-matthew
matthew
 
Posts: 15
Joined: Wed Aug 18, 2010 11:14 am

Re: custom field error message(s)

Postby SheriC » Wed Sep 22, 2010 5:27 am

Matthew,

Were you able to find a way to persist the custom checkout fields' data? If so, I'd appreciate knowing how you did this.

Thanks!
Sheri
SheriC
 
Posts: 11
Joined: Wed Jun 17, 2009 8:42 am


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 2 guests

cron