The Bestseller feature is usually similar to the Specials feature (see Figure 7.4). Whereas specials are items you want to promote (typically because of reduced prices or other promotions), bestsellers are products that you sell a lot ofand that's exactly the reason you want to call your customers' attention to them. Bestsellers are usually not as important as specials; therefore, their placement is normally not as prominent. Bestsellers can appear in various locations on the home page depending on the design of the store. For most stores, a narrow column along the right side of the home page works well for this purpose. To see an example, go to www.notetools.com. Figure 7.4. Bestsellers advanced feature.Setting up the bestsellers is a task with two main parts: identifying and listing the bestsellers, and showing them on the home page. Identifying the bestsellers is very similar to identifying specials. You need a field like the Specials property of the home page. Because the bestsellers will most likely be displayed on the home page only, you can add a new property called bestseller of type references to the home page. To mark an item as a bestseller, simply enter its ID into this new Bestseller box while editing the home page. As in the case of the specials, you can enter the IDs of multiple bestsellers into the Bestsellers box. Multiple IDs must be separated by spaces. To show the bestsellers, you need a template that will create the thumbnails and links for the bestsellers, and then you need to place this template on the home page. The template that creates the bestseller thumbnails, show-bestsellers, is listed next. For each bestseller, it shows the thumbnail of the bestseller, the name (or label) of the bestseller, and its price. It also hyperlinks both the thumbnail and the name to the bestseller's page: Show-bestsellers () TABLE border 0 cellspacing 0 cellpadding 0 width "100%" TABLE-ROW valign :top TABLE-CELL align :center TEXT-STYLE :bold TEXT "BESTSELLERS" LINEBREAK number 2 FOR-EACH-OBJECT @bestsellers FONT size 2 face @text-font WITH-LINK TO WHEN @template id WHEN IF test @icon then @icon else @image IMAGE source RENDER image IF test @icon then @icon else @image max-height WITH-OBJECT :index @thumb-height max-width WITH-OBJECT :index @thumb-width hspace 3 alt @name LINEBREAK FOR-EACH-BUT variable line sequence LINES IF test NONEMPTY @label then @label else @name last LINEBREAK TEXT line WITH= variable price value OR @sale-price @price WHEN price LINEBREAK FONT size 2 color @emphasis-color face @text-font TEXT PRICE number ELEMENT position 0 sequence price currency @currency LINEBREAK number 2 A number of small details require further explanation:
Now that you have a way to display the bestseller block, you need to add it to the home page. You can do this by modifying the copy of the home. template. Where you modify the template depends on the style of your home page: whether it uses top buttons or side buttons. The side button arrangement is easier. In this arrangement, you can simply add a new table cell before the part dealing with RIGHT-MODULES (this section is at the end of the page-body template in the old Yahoo! Store Editor, but it is missing from the new editor) and then call your show-bestsellers template. The entire cell is within a WHEN @bestsellers block so that you show the bestseller block if there are bestsellers to be shown. The relevant part of the template is listed here: :side-buttons TABLE border 0 cellspacing 0 cellpadding 0 TABLE-ROW valign :top CALL :yourstoreid-side-nav vnav TABLE-CELL FONT size @text-size face @text-font WITH= variable wid value (@page-width - 26) - vnav-wid CALL :yourstoreid-home-body nil nil wid WHEN @bestsellers TABLE-CELL CALL :show-bestsellers WHEN @right-modules TABLE-CELL width 10 SHIM height 1 width 10 TABLE-CELL valign :top width 150 CALL :yourstoreid-right-modules @right-modules If the store has a top navigation bar, adding the bestseller box is a little trickier. In this case, you want to put the entire page inside the left cell of a table, and put the call to show-bestsellers in the right cell of the same table. |