VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-Cart StoreFront Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Suggestions for future release
 Displaying Orders
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

VP-ASP Super User

254 Posts

Posted - June 30 2005 :  22:13:45  Show Profile  Reply with Quote
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.

Senior Member

United Kingdom
1898 Posts

Posted - July 01 2005 :  03:10:21  Show Profile  Visit devshb's Homepage  Reply with Quote
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:


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.



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:
(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



Simon Barnaby
[email protected]
Web Design, Online Marketing and VPASP addons

Edited by - devshb on July 01 2005 03:45:05
Go to Top of Page

VP-ASP Super User

254 Posts

Posted - July 01 2005 :  11:09:44  Show Profile  Reply with Quote
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.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000