BACK Button - inconsistent behavior

Questions and answers about ShopSite Custom Templates

BACK Button - inconsistent behavior

Postby jody » Mon May 24, 2010 3:09 pm

We have recently built a ShopSite store utilizing custom templates and have read several forum discussions regarding the behavior of the BACK buttons used on MORE INFO pages.

Each product in our store is assigned to multiple store pages. In our case, one store page type is a, "by Brand" page and the other store page type is a, "by Product Type" page. I understand that the BACK button on each MORE INFO page can only link to one of these store pages. So our preference is to link BACK buttons to the "Brand" pages.

Our method of implementing the BACK button on the MORE INFO template is:

<a href="[-- VAR.FileName --]">BACK</a>

where VAR.FileName is defined in our Page template as: [-- VAR.FileName PAGE.FileName --]

Some past comments in the SS forum state that the BACK buttons are automatically linked to the "first assigned" store page. However, in our testing that is not consistently the case whenever store pages are "republished".

What we have seen is that when we assign the product to the "Brand" page first and secondly to the "Product Type" page second, then the BACK button does indeed link to the first assigned "Brand" page.

However, whenever any product info is updated (such as a product price, etc) and the changes are saved and republished - then ShopSite will very often change the BACK button links to point to the second assigned "Product Type" page instead of the first assigned "Brand" page which was our preference.

The same problem also occurs if we "rearrange" products on either of the "Brand" or "Product Type" store pages - the BACK buttons are randomly and inconsistently changed.

We have gone through these tests multiple times and have not yet determined a predictable or easily controllable pattern.

Has anyone else noticed this behavior and/or have a suggestion?
jody
 
Posts: 3
Joined: Mon May 24, 2010 2:22 pm
Location: Santa Cruz, CA

Postby Jim » Mon May 24, 2010 3:56 pm

A product moreinformation page is only generated once during a publish.

If you go to Utilities > Publish > Regenerate it will cause a complete publish of all store pages and more info pages to occur. In that case the Back button would get the file name of the first page that is generated that contains that product.


If you modify a product or a page and the Publish tab pops up. If you click that to start your publish it only regenerates the pages /more info pages that are affected by the product or pages that changed. In this case the first page that contains the product will be assigned to your BACK button. This may not be the same as what happens during a full publish since the initial page may not need to be regenerated since no changes were made to it.

you can use the javascript to do a history -1 but that won't work if the shopper came to the page from a search.

The only consistent way to get the same result each publish is to do a full regenerate from Utilities > Publish. But that would not get you back to the Product Type page if the link was generated from was the Brand page.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby jody » Mon May 24, 2010 5:41 pm

Here is an example of what we have seen in our testing. I have just now tested and reconfirmed this:

Let's say we have 2 (similar type) products from 2 different brands. We want the BACK buttons from the MORE INFO page of each product to link to it's associated Brand page.

Product 1 (is assigned in this order to)
Brand X page
Product Type A page

Product 2 (is assigned in this order to)
Brand Y page
Product Type A page

At this point the BACK button for each product's MORE INFO page links correctly to it's X or Y Brand page. Which is what we want.

Now if we need to (and we do) rearrange the products on the Product Type A page and republish, suddenly all BACK buttons now link to the Product Type A page and NOT the Brand pages as it previously did.

The javascript history option doesn't work for us primarily because of the "Continue Shopping" button on the Cart pages, which return the visitors to the product they just added to their cart. So using the javascript history Back button method returns them to the Cart in an infinite loop.
jody
 
Posts: 3
Joined: Mon May 24, 2010 2:22 pm
Location: Santa Cruz, CA

Postby Jim » Mon May 24, 2010 6:51 pm

That is exactly what I was saying. The moreinfo page is only generated once during a publish. All products on a page will be regenerated during a publish.

If you have products assigned to page Type A and you publish after making changes to just that page, all product moreinfo pages for products on that page will be regenerated. They will therefore have Type A as the BACK link.

One option you might try is to specify which page you want the Back link to point to in one of the Custom Product fields. Then code the Back link so it uses the page specified in the custom field rather than using the filename of the page the product is assigned to. So your back link would be <a href="[-- product.fieldx --]">BACK</a> where product field x contains what ever page filename that you want it to link to. Using this approach where the back link points won't change when you make changes to a specific page.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby jody » Tue May 25, 2010 3:20 pm

Thanks for you help Jim.

I followed your suggestion and created a custom Product Field on all our More Info pages and provided a static link for each BACK button. Though I do think SS might want to consider providing a more elegant solution in the future for assigning BACK button links.

thanks again...
jody
 
Posts: 3
Joined: Mon May 24, 2010 2:22 pm
Location: Santa Cruz, CA

Postby Jim » Tue May 25, 2010 3:58 pm

What would you suggest for a solution? If a product is assigned to multiple pages how should we determine which one the back button links to? Remember these are static pages not dynamically generated.
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