| Prev | Next
Menu: Products - Portfolio - Services - Download - Order - Company

 
Topic #1.1.1.1.
Shopping Carts
   Overall Design  
   Multi-Store  
   DB-Driven  
   User Interface  
   Site Features  
   Delphi to W-HTML  
   The Order  
   Item Graphic  
   Not Included  
   Summary  
*

  

Browsing >>Delphi to W-HTML: Sending Macros

This is an example (from 1996) of how the Delphi code sends a W-HTML macro which can be changed to reflect the desired look for the store.

procedure TdmStore.ShowItemsDBGrid2RowStart(Sender: TwhdbScan;
  aWebDataSource: TwhdbSource; var ok: Boolean);
begin
  inherited;
  Sender.WebApp.SendMacro('drItemRow');
end;
The W-HTML for drItemRow looks like this, creating a link to the ItemDetail page, passing the current item number as the WebHub command string:
<whdroplet name="drItemRow">
(~waItemCheckBox.Execute~) 
<tr>
   <td><font size ="2">(~waInputField.Execute~) </font></td>
   <td><font size ="2">(~Field|WdsClassQuery|ItemID~)</font></td>
   <td><A HREF="(~cgiapp~):ItemDetail:(~Session~):
   item.(~FIELD|WdsClassQuery|ItemID~)">(~Field|WdsClassQuery|Item~)</A></td>
   <td ALIGN=RIGHT>(~CurrencyFormat.Execute~)</font></td>
</tr>
</whdroplet>

In 2009, we have some newer approaches which are more elegant, but the idea remains the same. The Delphi code can reference HTML code which can reference back to Delphi code -- as needed -- completely flexible.

Here is one glimpse into our online help system, where you can see a newer approach to naming the Delphi components, the droplets, and re-using the same droplet for the top of a table, the middle (which repeats), and the end of the table. SendDroplet Documentation.


 
Path:  www.href.com to; Services to; Tech Talk Archive to; Shopping Carts to; Delphi to W-HTML

Copyright © 1995-2012 HREF Tools Corp. All Rights Reserved Worldwide.
Running: WebHub-v2.167 compiled with d16_win32 on Microsoft-IIS/7.5,
Local Time: Thu, 24 May 2012 05:09:50.
Session 2092805004, 8 pages sent to CCBot/1.0 (+http://www.commoncrawl.org/bot.html) at 38.107.179.229;
Time to produce this page: 0msec.