Forums / General Questions / Add a return URL to add to cart

Add a return URL to add to cart

Locked

Views: 3,241

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
22 Oct 2007, 10:19 AM
#1
directpc avatar

directpc

Zen Follower

Join Date:
Feb 2007
Posts:
130
Plugin Contributions:
0

Add a return URL to add to cart

Hi all,

Does anybody know how to add a return URL to the shopping cart, basically we are trying to add a memory configurator to our website, the company who provides us with the configurator are asking for a return URL on the shopping cart, they do not have a clue how to do this, and im rather stuck.

This is what they are saying

The configurator will call the URL you give us ( The return url ) and append to the end of it the part number using a GET. An example of this could be : https://www.directpcsupplies.com/add.php?part=SD/2GB where SD/2GB is the part number selected. This page should then perform whatever logic you need to either add the part to your customer's web basket or display a product page, etc...

thanks in advance

23 Oct 2007, 10:30 AM
#2
directpc avatar

directpc

Zen Follower

Join Date:
Feb 2007
Posts:
130
Plugin Contributions:
0

Re: Add a return URL to add to cart

does anybody know how to do the above, i cant figure how to add a page for the shopping cart

23 Oct 2007, 5:23 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Add a return URL to add to cart

I'm not sure I understand what you're trying to do here.
You're talking about implementing a solution to some problem. What's the problem it's trying to solve? Maybe that'll help make things clearer.
Then maybe an answer to your original question may make more sense.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

24 Oct 2007, 12:21 PM
#4
directpc avatar

directpc

Zen Follower

Join Date:
Feb 2007
Posts:
130
Plugin Contributions:
0

Re: Add a return URL to add to cart

No what im trying to do is add a configurator to my website, now what i need to do is add a return url page in my shopping cart. So basically i need to know how to create a return url in the shopping cart.

24 Oct 2007, 1:12 PM
#5
directpc avatar

directpc

Zen Follower

Join Date:
Feb 2007
Posts:
130
Plugin Contributions:
0

Re: Add a return URL to add to cart

Right, I have some more information, but this makes me even more stuck, does anybody have any ideas now? This is the information from Kingston, for the return url they require, to add the configurator to work with my site

Below is some very simple code to give an idea of how a return url can work.

This is ASP code using VBScript and should only be used to get an idea of how a return url can work:

<%
partnumber = request.QueryString("part_code")

if len(partnumber) > 2 then
select case left(partnumber,2)
case "SD"
response.Redirect("./products/sd_homepage.asp?part=" & partnumber)
case "CF"
response.Redirect("./products/cf_homepage.asp?part=" & partnumber)
case "DT"
response.Redirect("./products/dt_homepage.asp?part=" & partnumber)
case else
response.Redirect("./products/generic.asp?part=" & partnumber)
end select
end if
%>

24 Oct 2007, 2:52 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Add a return URL to add to cart

I was looking for something more explanatory of the purpose behind using the tool that wants a return URL.

Something like: the configurator takes customer selections and comes back to my store and attempts to add the recommended item to the cart.

Is that correct?

If so, what part number does it try to add? Can you configure it to use the product_id of your products, or does it have to use the model_number instead? How exactly do you intend to tell it which product should be getting added to the customers' cart?

If it can be done using the product-id number assigned by Zen Cart when you created the product in your store, then you can probably just use this:

your_site.com/index.php?main_page=index&action=buy_now&products_id=THE_ZEN_CART_PRODUCT_ID_GOES_HERE

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 Oct 2007, 3:31 PM
#7
directpc avatar

directpc

Zen Follower

Join Date:
Feb 2007
Posts:
130
Plugin Contributions:
0

Re: Add a return URL to add to cart

thanks for the reply, you have the right idea, basically the configurator will choose the correct memory for my customer's computer and then add it to the cart. It has to be a product model number to work as the configurator works from the kingston servers. Would this make it difficult to create and would it work properly in zen cart.

30 Oct 2007, 3:46 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Add a return URL to add to cart

Write a custom cart action (/includes/extra_cart_actions/kingston.php ) and have it check for the buy_now action and the products_model parameter. Then do a lookup for products_id from products_model, and set the products_id into $_GET before going to the shopping cart class to do the actual add-to-cart.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 Oct 2007, 4:32 PM
#9
cjpinder avatar

cjpinder

Totally Zenned

Join Date:
Apr 2007
Location:
Herts. UK
Posts:
893
Plugin Contributions:
0

Re: Add a return URL to add to cart

Hi,

directpc:

It has to be a product model number to work as the configurator works from the kingston servers. Would this make it difficult to create and would it work properly in zen cart.

I believe the Quick Order mod here...
http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=555
...allows you to add products to your cart using a URL with a model number. It might be worth looking at to see if it fits your need.

Regards,
Christian.

31 Oct 2007, 6:14 PM
#10
directpc avatar

directpc

Zen Follower

Join Date:
Feb 2007
Posts:
130
Plugin Contributions:
0

Re: Add a return URL to add to cart

thanks, im looking into both methods to see which works best with the configurator, thanks for all your help so far and will update once i have tried these methods