Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 Customer Service Page tweak to add new menu item
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

snayar
Starting Member

USA
10 Posts

Posted - March 19 2009 :  21:44:33  Show Profile  Reply with Quote
Hello folks,

I would like to know the best way to modify the Customer Service page to add a new menu item along with the Customer Registration, Orders, Cart Administration and Contact Us items.

What do you think will take to accomplish this since it's a dynamically created page (formatted through shopcustadmin.asp)?

Thanks in advance!

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - March 20 2009 :  04:57:19  Show Profile  Reply with Quote
Hi,

I've created a few extra menu items on our customer service page. In shopcustadmin.asp one of the menu items I added to the Orders section was

AddMenuItem getlang("langstockemailview"),"shopstocknotify.asp?action=list", getconfig("xAllowReviewOrders")

You should create a new language record to display the text for the link. The getconfig.... is just a check that our site allows customers to review lists and orders. This is all that's needed if you just want to provide a simple link to another page on your site.

Regards,

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

snayar
Starting Member

USA
10 Posts

Posted - March 26 2009 :  18:17:46  Show Profile  Reply with Quote
Thank you carfin,

I managed to create the new content on shopcustadmin.asp by adding:

WriteMenuTable getLang("langAffMySprinkler"),"images/icons/design.gif"
AddMenuItem getlang("langaffviewmydesign"),"mysprinklersystemdesign.asp",getconfig("xAllowCoupons")
CloseMenuTable

but now I would like to make it dynamic and I'm not sure how yet.

Let me explain a bit further.

I created a new database (sql) column in the Customers table and named it "design" and we will use that field to add a URL through the backend admin panel so when a customer logs in and does not have this field (design) filled, it will simply not display the new option I created before which is basically a new page with the download link. And if the logged in customer do have a URL on the design field then it will display the menu option with the download link.

Any ideas on how to accomplish this?

Thanks again!!!
Sergio

Edited by - snayar on March 26 2009 20:31:51
Go to Top of Page

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - March 27 2009 :  06:12:04  Show Profile  Reply with Quote
Hi Sergio,

you will need to set up a sub routine to check the customer table and return a Yes or No value plus the page link if there is data in the design field. I'm not an expert but you will need a routine similar to this:

In shopcustadmin.asp before Sub SetUpMenus add the new check:

Sub CheckForDesign
dim myconn
dim rs
dim d
dim dlink
OpenCustomerDb myconn
dim tpassword, tlastname
tlastname=replace(strlastname,"'","''")
tpassword=replace(strpassword1,"'","")

sql = "select * from customers where lastname='" & tlastname & "' and password ='" & tpassword & "'"
sql = sql & "and design IS NOT NULL"

Set rs = myconn.Execute(SQL)
If Not rs.EOF Then
d="Yes"
dlink=rs.design
else
d="No"
end if
rs.close
shopclosedatabase myconn
end sub


Then change your menu item to:

AddMenuItem getlang("langaffviewmydesign"), dlink, d)

This has NOT been tested and is just a guide to what you need to achieve. Please back up your shopcustadmin.asp file before making significant changes.

Hope this helps,

Carrol
www.deanston-electrical.co.uk

Edited by - carfin on March 27 2009 10:28:20
Go to Top of Page

snayar
Starting Member

USA
10 Posts

Posted - March 27 2009 :  16:31:37  Show Profile  Reply with Quote
Thank you again Carrol!!!

But thanks to your other post about session vars, I ended up using that approach instead and it's working flawlessly!

If Session("design") = "True" Then
WriteMenuTable getLang("langAffMyDesign"),"images/icons/design.gif"
AddMenuItem getlang("langaffviewmydesign"),"myesign.asp",getconfig("xAllowCoupons")
CloseMenuTable
Else
WriteMenuTable getLang("langAffMyDesign"),"images/icons/design.gif"
response.write getlang("LangNoDesignText")
AddMenuItem getlang("langnodesign"),"../dir/design/design.htm",getconfig("xAllowCoupons")
CloseMenuTable
End If


You've been very VERY helpful!

Have a great weekend!!!!

Sergio

Edited by - snayar on March 27 2009 16:32:24
Go to Top of Page

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - March 28 2009 :  09:43:18  Show Profile  Reply with Quote
You're welcome.
It's what the forums are for and I'm just glad to help.
This a great cart, very easy to customise to exactly what you need.

Regards,

Carrol
www.deanston-electrical.co.u
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00