Author |
Topic |
|
rvaga
VP-CART Super User
USA
254 Posts |
Posted - June 30 2005 : 22:13:45
|
On the display orders page, customerid is shown along with orderid.
I think it would be helpful if any return customer was clearly indicated somehow - like the orange color when someone screws up an order (or the order didn't process completely for whatever reason).
Repeat business is crucial to any business - it would be beneficial to see at a glance how many of the orders are from returning customers.
|
|
devshb
Senior Member
United Kingdom
1904 Posts |
Posted - July 01 2005 : 03:10:21
|
That would be a good thing to have.
If you're using templates for emails, then you could use our extra-template-fields addon and use one of the examples as a way of translating the ocustomerid to a flag if they've ordered before. One of the examples which comes with it is getting a category description for a category code, and you could use that example as a base for a sql/field which sees if the customer has placed an order before.
That extra-template-fields addon works for product pages, and emails; for emails it uses the order cursor/record, and for products it uses the product cursor/record.
If you want to use that as a base/example, your best bet would be to buy the blank-out-zero-ccy-amounts addon:
http://bigyellowzone.com/shopexd.asp?id=61
as you can then optionally use that to blank out tax/shipping amounts in the emails if they're zero etc, and use the example4 field as a base for your custom-built has-user-already-ordered-flag field.
or:
http://bigyellowzone.com/shopexd.asp?id=44
for country-name template field
or just do a browse-all on the category list on our site; anything which includes BYZ033 (the generic extra-template-fields addon) will come with the examples.
or have a look at: http://bigyellowzone.com/softwareversions.asp (which is a full list of all our versions/addons which show how they're all linked together) and look for "BYZ033" and pick which item most suits you; most of those are in the "Template-Field Related" section about a third of the way down.
If you've already got our extra-template-fields addon (byz033) then you can just use example4 as your base for your new field.
All that assumes that you use templates for emails.
If you don't use templates, you could still use example4 as a base and then build your new function and call it direct from the asp.
The relevant sql to retrieve the flag would be something like:
tsql="select count(*)" tsql=tsql&" from orders as ordnew,orders as ordold" tsql=tsql&" where ordnew.ocustomerid=ordold.ocustomerid" tsql=tsql&" and ordnew.orderid<>ordold.orderid"
' Include this line for "previous customers", or exclude it for "any other order (previous or since/subsequent)": tsql=tsql&" and ordnew.orderid>ordold.orderid"
tsql=tsql&" and ordnew.orderid="&arg_in_value
and then if that returns null or zero or no record then set your flag as "N", otherwise set it to "Y"
and use the orderid as the template-field argument in the email template
eg:
Previous Customer ? [BYZ_CUSTOMISED_ORDER_CUSTOMER_ALREADY_ORDERED orderid]
Simon Barnaby Developer [email protected] www.BigYellowZone.com Web Design, Online Marketing and VPASP addons
Edited by - devshb on July 01 2005 03:45:05 |
|
|
rvaga
VP-CART Super User
USA
254 Posts |
Posted - July 01 2005 : 11:09:44
|
Thanks Simon,
I do own byz-033, I don't use email templates (I send order confirmations via email, using templates that fit different order scenarios - the same templates I've used for years, before switching to VPASP). It all seems a bit daunting, but I'll give it a try based on your suggestions above. Thanks Again.
|
|
|
|
Topic |
|