Mobile subproducts

General ShopSite user discussion

Mobile subproducts

Postby sholt » Thu Dec 08, 2011 12:55 pm

I'm surely missing something, I have a product with two subproducts. works great in the desktop browser. Using the default mobile template only the base product shows (with a price of 0.00 and there is no option two choose either of the subproducts. I'm using the classy template in the desktop.... Help
sholt
 
Posts: 23
Joined: Thu Dec 27, 2007 11:26 am

Re: Mobile subproducts

Postby Jim » Thu Dec 08, 2011 3:14 pm

I have verified that the mb_DefaultProductTemplate.sst has neither the [-- define subproduct --] section or code in the [-- define product --] to go through the loop of subproducts. I guess the designer decided that subproducts weren't important to mobile users ;(

I have logged this as a bug to be fixed in a future version.

I was able to slightly modify a copy of the mb_DefaultProductTemplate.sst and add code to display the subproducts. Here is what I added to the top of the template.
Code: Select all
#########################
[-- DEFINE SUBPRODUCT --]
#########################
[-- IF VAR.MoreInfoTemplate --]
<div class="Subproduct">
[-- IF ANALYTICS_MULTI_DOMAIN --]
<form action="[-- SHOPPING_CART_URL BASE --]/order.cgi" method="post" onSubmit="javascript:__utmLinkPost(this)">
[-- ELSE --]
<form action="[-- SHOPPING_CART_URL BASE --]/order.cgi" method="post">
[-- END_IF --]

[-- INCLUDE Subproduct-Name PROCESS --]
[-- INCLUDE Subproduct-Price PROCESS --]
[-- INCLUDE Subproduct-AddToCartButton PROCESS --]
</div>
[-- ELSE --]
[-- INCLUDE Subproduct-Name PROCESS --]
[-- INCLUDE Product-Price PROCESS --]
[-- INCLUDE Subproduct-AddToCartButton PROCESS --]
[-- END_IF --]

#############################
[-- END_DEFINE SUBPRODUCT --]
#############################
That creates the layout for the subproducts themselves but you still need to modify the [-- Define Product --] part to get the subproducts to display. So here is what I added between the [-- DEFINE PRODUCT --] tag and above the <tr> tag (I'm including those 2 lines so you can see where I put it.
Code: Select all
[-- DEFINE PRODUCT --]
[-- if product.subproduct --]
[-- INCLUDE Product-Name PROCESS --]
[-- INCLUDE Product-Description PROCESS --]
  [-- VAR.MoreInfo no --]
  [-- LOOP SUBPRODUCTS --]
    [-- SUBPRODUCTS --]
  [-- END_LOOP SUBPRODUCTS --]
[-- else --]
<tr>
And at the very end of the [-- Define Product --] section, just before the [-- END_DEFINE PRODUCT --] I added another [-- END_IF --] (so there will be 2 there) to close the [-- if product.subproduct --] that I added at the top of the section.
Code: Select all
[-- END_IF --]
[-- END_IF --]
[-- END_DEFINE PRODUCT --]

So try adding those sections to a copy of the template, then change the default mobile product and search product templates to what ever you called the template and see if that works for you.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Mobile subproducts

Postby sholt » Fri Dec 09, 2011 6:00 am

Jim,
Thanks for the fast reply.
I tried your suggestion and think I correctly followed your directions.
Unfortunately now neither the product or the subproduct shows up on the mobile site.
I readily admit to being a complete noob when it comes to editing a template.
I see a reference to a more info page in your code, does the fact that my product and subproducts do not use a more info page come into play?
Besides the changes you suggested the only other change I have made to the default mobile template is to cause the dropdowns to stack rather than flow horizontally (multiple dropdowns caused the page to be wider than the display)

I hesitate to include a copy of my changes as that would make the thread much larger but I can if you think it would help


thanks again.
sholt
 
Posts: 23
Joined: Thu Dec 27, 2007 11:26 am

Re: Mobile subproducts

Postby Jim » Fri Dec 09, 2011 7:37 am

send it to me in a PM by using the PM button on the right side of the post.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Mobile subproducts

Postby sholt » Mon Dec 12, 2011 11:47 am

Jim,
Pm'd the file to you Friday morning, wanted to make sure you received it and see if there was any update.

thanks
sholt
 
Posts: 23
Joined: Thu Dec 27, 2007 11:26 am

Re: Mobile subproducts

Postby Jim » Mon Dec 12, 2011 12:33 pm

Sorry about the delay in getting back to you. I did receive the file and have done some looking at it but got swamped at work and spent most of the weekend at the hospital with an uncle who is ill. I'll do some more looking to see what I can find out and get back with you but it may be a couple of days due to work and the sick uncle. I'll also send an email to the designer of the template and have them look into it. Maybe she will have some ideas on it.
Jim
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Mobile subproducts

Postby sholt » Fri Dec 16, 2011 6:25 am

Sorry to hear about your Uncle, completely understand the "getting swamped" part, happens to me all the time. Just update me when you can. If this is an issue that cannot be resolved it will change the updates to my site I had planned.

thanks again
sholt
 
Posts: 23
Joined: Thu Dec 27, 2007 11:26 am

Re: Mobile subproducts

Postby Jim » Fri Dec 16, 2011 1:26 pm

This is an issue that can be fixed so don't change your plans because of the way it is currently (not)working.
I'm still looking at the template and seeing what other changes need to be made to the template. My main rush at work has been completed so I'll have a little more time to look at it. Hopefully by Monday I'll have something for you.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah


Return to User Forum

Who is online

Users browsing this forum: No registered users and 114 guests