PDA

View Full Version : Managing BSKE Page


Brandon MUS
07-24-08, 08:12 PM
I want to really revamp our empty basket message, but I can't figure out the best way to manage the screen. There is of course the dedicated BSKE screen that should show up if the basket is empty, but if the customer is removing items from their cart, they stay on the BASK screen. This is overcome by putting a snippet at the top of the Basket Contents item that displays a short message if the basket is empty, followed by an exit. That same technique is used on the checkout screens as well...

All said and done, I believe that the default empty basket message exists in at least 5 spots (BSKE, BASK, OCST, OPAY, OSEL). I want to add a lot of features to BSKE including best sellers, promotional stuff and some technical help. I really do not want to have to upkeep all 5 screens, so my question is if anyone found a better way?

I was thinking of stripping everything except the message from the BSKE screen and then using function #40 in the toolkit to render it in the 5 spots (kind of like using an include in php). My initial test looks like it would work pretty well, but I was curious if there was any other thoughts on the matter.

A JavaScript/meta redirect to BSKE is not an option.

Brandon MUS
09-06-08, 12:55 AM
Not a lot of interest in this post, but this is what I ended up with:

At the top of all of the relevant page templates (BASK, OCST, OPAY, OSEL), include this code (Toolkit required of course):<mvt:if expr="l.settings:basket:empty">
<mvt:comment>Basket is empty, render BSKE instead</mvt:comment>
<mvt:item name="toolkit" param="render|BSKE" />
<mvt:exit />
</mvt:if>

You can strip the default text out of the "Basket contents" item template of all of the pages if you want, but its not that important. So far (I just put this in place a few minutes ago), it seems like this works perfectly. I'll post back if I ever find an issue with it, but I no longer have to upkeep the same message in 5 templates.

Leanne
09-06-08, 05:35 AM
This is very cool. I was interested, but didn't have much to offer. Thanks for sharing this -- it will come in very handy!

JFancett
09-06-08, 04:47 PM
Yes, thank you. Very nice and object oriented. It's always nice to make changes to as few areas as possible.