Mobile Product Display

General ShopSite user discussion

Mobile Product Display

Postby VinceS » Wed Mar 06, 2013 9:23 am

Running ShopSite Pro v11sp2

Added the Mobile App code to my templates

On Pages displaying Products that have Sub-products, the sub-products are displaying under the Product title as bullet items with the last sub-product bullet selected.
You can see it here
http://ahoydemo.ahoycaptain.com/cgi-ahoydemo/sb/ss_mb.cgi?storeid=*16645408ca8840121757ae4f6a&ss_parm=Af6e3e7681c103476808f48be8a709b30

I don't see the logic behind this. How can I suppress this without affecting my full HTML site products.
VinceS
 
Posts: 134
Joined: Fri Apr 06, 2007 1:26 pm

Re: Mobile Product Display

Postby VinceS » Wed Mar 06, 2013 10:07 am

After more testing I see that ALL sub-products are displayed this way. Even in the More Info page for a product.

Just makes no sense to me to have Radio Buttons which by nature are singularly selectable.

If anything they should be check boxes for multiple selection along with the main product. Select a bunch of sub-products under the main product and they all get added to the cart at once.I know that is not he intent here, but that makes more sense to me.
VinceS
 
Posts: 134
Joined: Fri Apr 06, 2007 1:26 pm

Re: Mobile Product Display

Postby Jim » Wed Mar 06, 2013 11:00 am

You can change the templates used for mobile devices under Preferences > Mobile. Only one mobile template is currently provided by ShopSite but you can create new ones just as you can for any other store page.

The template designer is of the opinion that a minimal page should be displayed on mobile devices for ease of use. Displaying subproducts with radio buttons makes it easy for the shopper to choose what they want and order it. I'm not sure why all of your products have similar listings unless you have all of the products assigned as subproducts to each other.

You could try changing the mobile template product template to a normal product template and see if you can get it working the way you like. Or you could create a mobile version of your own product template and use that.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Mobile Product Display

Postby VinceS » Wed Mar 06, 2013 11:39 am

Thanks Jim
But I'm not sure you grasp what I'm experiencing here.

Here is an example of a parent product with sub-products
http://ahoydemo.ahoycaptain.com/cgi-ahoydemo/sb/ss_mb.cgi?storeid=*16645408ca8840121757ae4f6a&ss_parm=A66a71569351429b385e726e9a62bdf7a

If the customer has found this product and wants to purchase it, in this case a 6oz jar, there is no way he can do that because the radio button that is selected by default is one of the sub-products, not the parent product - the 6oz jar. The parent product is nowhere to be found in the list and you can't un-select the radio button.

I understand the template designers motive, but the execution falls short in a real world setting. And after 30+ years of software development I know that happens more often than not.

I would like to see the code for the Mobile template. Where can I find that?
VinceS
 
Posts: 134
Joined: Fri Apr 06, 2007 1:26 pm

Re: Mobile Product Display

Postby loren_d_c » Wed Mar 06, 2013 12:11 pm

I would like to see the code for the Mobile template. Where can I find that?


Go to Merchandising -> Custom Templates -> Page/Product, use the Copy ShopSite Template function in the Product Templates section, and make your own copy of the product template named mb_MobileDefaultProduct.sst. The subproduct definition is at the top. You can change the type of form field from radio to checkbox.

-Loren
loren_d_c
 
Posts: 2572
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Re: Mobile Product Display

Postby VinceS » Wed Mar 06, 2013 1:29 pm

Thanks Loren but basically that only exposed more issues.

I copied the template as advised, renamed it, changed the Mobile Preferences etc. and changed from "radio" to "checkbox".

Now the parent product appears with all the sub-products as check boxes and they are all checked and when you un-check them all and click the add to cart button, I get this error:
We're sorry, but there was an error in your form data!
Please specify a valid value for the itemnum .

Which is pretty much what I expected. The parent products item number is not being populated to the AddToCart button in the form.

Now on a positive note, if I check a couple of the sub-products then hit add to cart, it DOES add all the checked sub-products to the cart. That's sweet!
Only problem is, it doesn't add the parent product which is what the customer came to buy in the first place.
VinceS
 
Posts: 134
Joined: Fri Apr 06, 2007 1:26 pm

Re: Mobile Product Display

Postby VinceS » Wed Mar 06, 2013 2:08 pm

OK Found the problem and here's the fix.

1) Change the code in the DEFINE SUBPRODUCT area to:

[-- DEFINE SUBPRODUCT --]
<input type="checkbox" name="itemnum" value="[-- PRODUCT.RecordNumber --]" unchecked>

this effectively leaves all the sub-products unchecked when first displayed with the parent product.

2) Now for the fix in the cart form
Here's the code with the "error" first
<form action="[-- SHOPPING_CART_URL Base --]/order.cgi" method="post">
<input type="hidden" name="storeid" value="[-- STORE.ID --]">
<input type="hidden" name="dbname" value="products">
<input type="hidden" name="function" value="add">
[-- IF PRODUCT.SubProduct --]
[-- LOOP SUBPRODUCTS --]
[-- SUBPRODUCTS AC_MobileDefaultProduct.sst --]<br>
[-- END_LOOP SUBPRODUCTS --]
[-- ELSE --]
<input type="hidden" name="itemnum" value="[-- PRODUCT.RecordNumber --]">
.
.
........
And there's the problem. Its the IF statement. If the product has sub-products the branch of the IF statement does the sub-product loop and "itemnum" is never populated with the RecordNumber parent value.

Here's the simple fix:

<form action="[-- SHOPPING_CART_URL Base --]/order.cgi" method="post">
<input type="hidden" name="storeid" value="[-- STORE.ID --]">
<input type="hidden" name="dbname" value="products">
<input type="hidden" name="function" value="add">
[-- IF PRODUCT.SubProduct --]
[-- LOOP SUBPRODUCTS --]
[-- SUBPRODUCTS AC_MobileDefaultProduct.sst --]<br>
[-- END_LOOP SUBPRODUCTS --]
<input type="hidden" name="itemnum" value="[-- PRODUCT.RecordNumber --]">
[-- ELSE --]
<input type="hidden" name="itemnum" value="[-- PRODUCT.RecordNumber --]">
.
.
.....
Now regardless of whether there are sub-products or not, the PARENT RecordNumber is always captured. AND the added benefit is that if I check several of the sub-products the checked sub-products get added to the cart along with the Parent. AS IT SHOULD BE!
VinceS
 
Posts: 134
Joined: Fri Apr 06, 2007 1:26 pm


Return to User Forum

Who is online

Users browsing this forum: Bing [Bot] and 127 guests