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-ASP Shopping Cart Customer Forum

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

 All Forums
 VPCart Forum
 General help me questions
 Remove Checkout Pages
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

nettrader
Starting Member

Australia
19 Posts

Posted - May 09 2010 :  23:36:54  Show Profile  Visit nettrader's Homepage  Reply with Quote
I have several customers who have trade accounts with us.

I would like to set these customers up as trade account customers within the website.

As trade customers, when they visit our website to make make a purchase, I would like them to skip the payment pages as payment details are not required from them as all purchases will be placed on their trade account when their order is despatched.

Is there any way I can turn off the payment pages for these customers so they don't have to go through the payment process.

All other customers will still need to go through the payment process.

This facility is only required for Trade Customers.

carfin
VP-ASP Expert

United Kingdom
948 Posts

Posted - May 10 2010 :  04:12:18  Show Profile  Reply with Quote
Hi,

if you are using V6.50 then I can help you to add a small piece of code to check for a customer type before the checkout process.

Regards,

Carrol
www.deanston-electrical.co.uk
Go to Top of Page

nettrader
Starting Member

Australia
19 Posts

Posted - May 13 2010 :  01:27:38  Show Profile  Visit nettrader's Homepage  Reply with Quote
What will I need to do or say to get you to share this information to me Carroll????
Go to Top of Page

carfin
VP-ASP Expert

United Kingdom
948 Posts

Posted - May 13 2010 :  03:57:07  Show Profile  Reply with Quote
Well I was hoping that you might tell me which version of VP-ASP you are using first, because what works for v6.50 may not work for v7.0. If it's v6.50 here's what you need to do.

Open the file shopcreateorder.asp in a text or html editor

Find the sub SaveThisOrder (line 110 approx)

Add the code shown in red, substituting "Trade" for whatever value you have for the trade customers type.

dim checkoutpage
if xcheckout <> "" then
checkoutpage=xcheckout
else
checkoutpage=Getconfig("xcheckout")
end if


if getsess("customertype")="Trade" then
checkoutpage=xcheckoutdummy.asp
end if


If getconfig("xIncludeOidOnLink")="Yes" then
responseredirect ssl & checkoutpage & "?oid=" & oid
else
responseredirect ssl & checkoutpage
end if
end sub


Regards,

Carrol
www.deanston-electrical.co.uk
Go to Top of Page

nettrader
Starting Member

Australia
19 Posts

Posted - May 13 2010 :  20:00:33  Show Profile  Visit nettrader's Homepage  Reply with Quote
Thanks Carrol. You are a diamond.
Go to Top of Page

nettrader
Starting Member

Australia
19 Posts

Posted - May 13 2010 :  20:05:20  Show Profile  Visit nettrader's Homepage  Reply with Quote
one last question - which field in the customer table do I need to insert the word 'Trade' into for the application to recognise the customer as a trade customer.
Go to Top of Page

carfin
VP-ASP Expert

United Kingdom
948 Posts

Posted - May 14 2010 :  07:54:25  Show Profile  Reply with Quote
My apologies, there was an error in the code I gave you. (I should have tested it all before I posted)
This should be correct:

if getsess("customertype")="Trade" then
checkoutpage="shopcheckoutdummy.asp"
end if


In the customer record, use the field custother1 to store the names representing your types of customer (separated by a comma) eg Trade,Wholesale,Franchise. This field is easier to use than contacttypeid which is numeric only. You will also have to change Admin config field xcustomerpriceidentifier to custother1.

I have seen your other post regarding the franchise group and I'll reply to that soon.

Regards,

Carrol
www.deanston-electrical.co.uk

Edited by - carfin on May 14 2010 08:01:20
Go to Top of Page

nettrader
Starting Member

Australia
19 Posts

Posted - May 28 2010 :  01:55:16  Show Profile  Visit nettrader's Homepage  Reply with Quote
I updated the code using that provided but received the following error in firefox at checkout stage:

Microsoft VBScript compilation error '800a0400'

Expected statement

/shopcreateorder.asp, line 194

end sub
^

The grouping solution works a treat. Thanks
Go to Top of Page

frelun
Starting Member

Sweden
10 Posts

Posted - May 28 2010 :  03:41:20  Show Profile  Reply with Quote
Is this a feature that is standard in the 7.0 or must it be hand coded? I realy want to have this.

Thanks

Fred
Go to Top of Page

carfin
VP-ASP Expert

United Kingdom
948 Posts

Posted - May 28 2010 :  03:51:26  Show Profile  Reply with Quote
nettrader - can you post the code a couple of lines before, including and after your line 194 in shopcreateorder.asp please? I have tested out the code in IE, Chrome and Firefox and it works fine.

fred - I don't have v7.0 so I'm afraid I can't answer your question but I'm pretty sure that it's not available. Perhaps someone else could clarify this.

Regards,

Carrol
www.deanston-electrical.co.uk
Go to Top of Page

diegomilito
VP-ASP Expert

Argentina
723 Posts

Posted - May 28 2010 :  04:03:45  Show Profile  Reply with Quote
I can confirm that in V7, it allows for customer grouping. There is a feature called Customer Group.

But, the customer group feature do not have the ability to turn on/off the payment pages for customers assigned into a group.

Hope this helps.
Go to Top of Page

nettrader
Starting Member

Australia
19 Posts

Posted - May 29 2010 :  01:45:31  Show Profile  Visit nettrader's Homepage  Reply with Quote
Here we go:

action = request.form("action")
if action="" then
action = request.form("action.x")
end if
' no action so display final form in this session
SetSess "CurrentURL","shopcreateorder.asp"
if Action="" then
if getconfig("Xbypasscreateorderpage")="Yes" then
dim remove
remove="NO"
CartFormat remove
Savethisorder
else
ShopPageHeader
if getconfig("xbreadcrumbs") = "Yes" then
response.write "<div class='breadcrumb'><a href='" & getconfig("xhome") & "'>" & getlang("langcommonhome") & "</a> " & SubCatSeparator & getlang("langorderdetails") & "</div>"
end if
Response.write "<h1>" & getlang("langorderdetails") & "</h1>"
DisplayForm
ShopPageTrailer
end if
else
SaveThisOrder
end if

Sub SaveThisOrder





dim checkoutpage
if xcheckout <> "" then
checkoutpage=xcheckout
else
checkoutpage=Getconfig("xcheckout")
end if

if getsess("customertype")="trade" then
checkoutpage="shopcheckoutdummy.asp"
end if

If getconfig("xIncludeOidOnLink")="Yes" then
responseredirect ssl & checkoutpage & "?oid=" & oid
else
responseredirect ssl & checkoutpage
end if
end sub






'------------------------------------------
' VP-ASP 6.50.4 Bugs Fix - 08 October 2008
'------------------------------------------
'Recalculate
CartFormat remove
ShopAddOrder ' add order to database
oid=GetSess( "orderId")

HandleGiftRegistry

HandleGiftPurchase
Go to Top of Page

carfin
VP-ASP Expert

United Kingdom
948 Posts

Posted - May 31 2010 :  04:43:56  Show Profile  Reply with Quote
nettrader,
I removed my last post, I thought I had seen a solution but I was wrong. I cannot see anything wrong with your code apart from a couple of lines missing from the start of the Sub SaveThisOrder. Here is the code for the whole sub from my test site which works fine:

Sub SaveThisOrder
ShopAddOrder ' add order to database
oid=GetSess( "orderId")

HandleGiftRegistry

HandleGiftPurchase

if Getsess("ordertotal")= 0 then
updatepaymentinfo getlang("langpaymentNone")
responseredirect "shopthanks.asp"
end if
if getconfig("xframes")="Yes" and getconfig("xframessl")<>"" then
responseredirect getconfig("xframeSSL")
end if

'VP-ASP 6.50 - get checkout value from shop$config.asp rather than config table
dim checkoutpage
if xcheckout <> "" then
checkoutpage=xcheckout
else
checkoutpage=Getconfig("xcheckout")
end if

if getsess("customertype")="Trade" then
checkoutpage="shopcheckoutdummy.asp"
end if

If getconfig("xIncludeOidOnLink")="Yes" then
responseredirect ssl & checkoutpage & "?oid=" & oid
else
responseredirect ssl & checkoutpage
end if
end sub


Regards,

Carrol
www.deanston-electrical.co.uk

Go to Top of Page

nettrader
Starting Member

Australia
19 Posts

Posted - June 08 2010 :  06:20:35  Show Profile  Visit nettrader's Homepage  Reply with Quote
I'm still getting the following:

Microsoft VBScript compilation error '800a0400'

Expected statement

/shopcreateorder.asp, line 217

end sub
^

Will this be a conflict with another variable that has been customised?
Go to Top of Page

carfin
VP-ASP Expert

United Kingdom
948 Posts

Posted - June 08 2010 :  10:51:34  Show Profile  Reply with Quote
It's very hard to tell without knowing what custom work has been done not just to this file, but to others that may linked. I would advise contacting the person who did the custom code and ask for their advice on your error when including the customer type session check.

Regards,

Carrol
www.deanston-electrical.co.uk
Go to Top of Page

nettrader
Starting Member

Australia
19 Posts

Posted - June 09 2010 :  06:43:16  Show Profile  Visit nettrader's Homepage  Reply with Quote
Just to clarify, there has been no custom coding done on the site, just changes to the configuration in the admin which were done with the assistance of the VPASP support team. Noone else has touched the code.
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000