Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Problems and bugs
 Continue Shopping URL
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

fali
Starting Member

Canada
6 Posts

Posted - July 02 2014 :  11:05:57  Show Profile  Visit fali's Homepage  Reply with Quote
Hi,

I recently configured xcontinueshoppingdynamic = "Yes" to enable continue shopping URL but found few situations where it does not always make sense.

For example, if I am on shopcreateorder.asp page and click "Edit" to edit my cart and then click continue shopping, I am redirected to shopcreateorder.asp page instead.

Similarly, if I am visiting a content page and click on view cart and then click continue shopping I am redirected to the content page I was visiting.

Is there a way I can only have last product or category page visited saved the xcontinueshopping field?

Thanks,

Faisal Ali

diegomilito
VP-CART Expert

Argentina
779 Posts

Posted - July 19 2014 :  04:54:32  Show Profile  Reply with Quote
faisal ali, for me i think any time you set xcontinueshoppingdynamic on, system of the cart will maybe ignoring the xcontinueshopping value u put. i have no idea how to custom made it.
diego
Go to Top of Page

manilow
VP-CART New User

France
134 Posts

Posted - July 19 2014 :  09:13:01  Show Profile  Visit manilow's Homepage  Reply with Quote
Fali,

It needs some hard coding to get it done.

Put these lines at the top of the shop$db.asp file:

''Set backpage for continue shopping button in cart
dim curl, cqstring
curl = request.ServerVariables("SCRIPT_NAME")
cqstring = request.ServerVariables("QUERY_STRING")
if cqstring <> "" then curl = curl & "?" & cqstring
if instr(curl,"shopdisplayproducts")>0 or instr(curl,"shopdisplaycategories")>0 or instr(curl,"shopexd")>0 then
setSess "continueshoppingpage",curl
end if


The last visited product page is saved in a session value.

Then modify your shopaddtocart.asp file:

''Find out where we came from
sub SetContinueURL (ContinueURL)
dim pagefrom, words(20),wordcount

''Return to last visited product page
if getSess("continueshoppingpage")<>"" then
pagefrom = getSess("continueshoppingpage")
else

pagefrom= request.servervariables("http_referer")
end if

ParseRecord pagefrom, words, wordcount,"/"



Existing lines are in blue, new lines to be added in red.

Kind regards,

Erik
www.aquathermia.com
Go to Top of Page

diegomilito
VP-CART Expert

Argentina
779 Posts

Posted - July 22 2014 :  22:41:11  Show Profile  Reply with Quote
erik, ur coding is working for me !! i tried myself here.
that s good sharing. i will use in my site too
diego.
Go to Top of Page

serjtankian
VP-CART Super User

Armenia
378 Posts

Posted - July 23 2014 :  05:09:56  Show Profile  Visit serjtankian's Homepage  Reply with Quote
will try on my test store

thanks






*serj*
Go to Top of Page

fali
Starting Member

Canada
6 Posts

Posted - July 31 2014 :  16:40:47  Show Profile  Visit fali's Homepage  Reply with Quote
Thanks Erik for your help on this.

I am using VPASP SEO module so my pages have SEO friendly URLs. I modified your code to work for SEO friendly URLs:

shop$db.asp:

dim curl, cqstring
curl = request.ServerVariables("SCRIPT_NAME")
if instr(curl,"products") > 0 then
setSess "continueshoppingpage", curl
end if

shopaddtocart.asp code is same as yours.

Thanks!

Faisal Ali
Go to Top of Page

diegomilito
VP-CART Expert

Argentina
779 Posts

Posted - August 01 2014 :  23:41:53  Show Profile  Reply with Quote
pretty cool fali. thats why i choose and keep using vpasp. i love the sharing idea here in the forum.
diego.
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