Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / Linking to/from an External Site for a Product

Linking to/from an External Site for a Product

Started by ljudice on 2 May 2013, 10:22 PM · Views: 1,456

Results 1 to 13 of 13
2 May 2013, 10:22 PM
#1
ljudice avatar

ljudice

New Zenner

Join Date:
May 2013
Location:
Western NJ
Posts:
7
Plugin Contributions:
0

Post #1 by ljudice

Hi - I've been searching all over this forum (and the web) for an answer to this problem and have come up with nothing. I appreciate your time in helping me...

My client has a need to sell a product which is "designed" on an external site. These are custom public safety type badges and every one is different. Their supplier has a design site which allows configuration and pricing of a product that can then be "dropped" back into my client's shopping cart. I need to pass to the external site the "URL of the page to Post Back to (the page which is processing "Add to Cart" action)" - but I cannot find what that is for Zen Cart. I am presuming that if such a URL exists that there is a protocol for putting the description and price back into the client's cart.

I am also not exactly sure of the best way to send someone to the external site (ie. provide "Design Your Badge" link under a specific product.

If anyone has a direction to look in or a plug-in perhaps that accomplishes some of this, I would be grateful.

Thanks very much for your help!!!

  • Lou
6 May 2013, 12:17 PM
#3
ljudice avatar

ljudice

New Zenner

Join Date:
May 2013
Location:
Western NJ
Posts:
7
Plugin Contributions:
0

Post #3 by ljudice

Thanks very much for that link... The problem is that the product cannot be pre-defined in the Zen site. I could have a "P200" badge set up as a product, but the partner site would have info like engraving information, color selection, enamel vs no enamel, etc... The partner implies that they "pass" this info back to the shopping cart by hitting a target URL on the cart site, but there is no other information about how this is done. Their developer is on maternity leave and no one else seems to know much.

Is there any mechanism for passing a bunch of parameters - ie. matching a set of defined attributes - from an external site?

Thanks again for your help - I've been working with Zen for a while and never encountered this type of problem before.

  • Lou
6 May 2013, 3:28 PM
#4
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,920
Plugin Contributions:
24

Post #4 by dbltoe

I would just duplicate the "p200" process on the current site. With the attributes controller, you should be able to come up with a workable solution.

You say it has a lot of selections? Take a look at http://gomagnetic.com/index.php?main_page=product_info&cPath=30_35&products_id=60. Text fields can be added as well for the engraving.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

7 May 2013, 1:09 PM
#5
ljudice avatar

ljudice

New Zenner

Join Date:
May 2013
Location:
Western NJ
Posts:
7
Plugin Contributions:
0

Post #5 by ljudice

dbltoe - thanks - and that's a nice site!

Received this from the partner site developer:

"That data is passed back via HTTP POST, to a page on your website which must
be programmed to receive all parameters and process them (add the
<<partner-site>> item to your cart). You indicate the URL of this page via
"process_url" parameter of the IFRAME URL. "

Does this sound like something that is possible?

7 May 2013, 1:18 PM
#6
ljudice avatar

ljudice

New Zenner

Join Date:
May 2013
Location:
Western NJ
Posts:
7
Plugin Contributions:
0

Post #6 by ljudice

They added:

"you need to be able to
overwrite the default cart behaviour in order to allow adding the
<<partner-site>> item, which is dynamic, will always have different options and
different cost, as selected by user on our site. "

Thanks again for your help!

7 May 2013, 2:33 PM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #7 by gjh42

At the most basic level, you will need to have all of the possible options created in your Zen Cart attribute system, else the returned option values will be meaningless to your system. ZC attributes have an individual product id component to their setup, as well as an option name id and value id. You would need to have base products corresponding to each partner site base product, with attributes also corresponding. Then the returned order info can be made to plug in a new instance in the cart with the correct attributes. Not sure about the pricing; you may be able to customize the cart to accept the partner-derived pricing. The ZC cart has built-in features for going back to the (ZC) product and editing the attributes, and you would need to disable this or code it to go to the partner site (not sure if that would be feasible).

7 May 2013, 2:37 PM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #8 by gjh42

If the pricing is straightforward, you may be able to set up the ZC products/attributes with matching pricing, which would greatly simplify the integration. It would not actually use all of the returned pricing but would make the same calculations to arrive at the same price internally. This does mean keeping your prices synchronized with the partner site.

8 May 2013, 3:22 PM
#9
ljudice avatar

ljudice

New Zenner

Join Date:
May 2013
Location:
Western NJ
Posts:
7
Plugin Contributions:
0

Post #9 by ljudice

Thanks for your reply! That was my thought as well - however - the developer at the partner says that is not the way anyone
has done it (and they are not sure what platforms anyone has used). For one thing, there are thousands of products with
dozens of options and customizations each.

They say what people do is: have a generic xyzzy product in their database of products, with the price zero. Then they overwrite cart behaviour, so that:

  1. the price in the cart is the price received from xyzzy site (via POST)
  2. they have a text field available in the database of orders, where they write all user's option for the badge, one attribute per line (badge model, badge finish, engraving text, etc)

Does this even sound possible within Zencart?

And is the post back URL documented anywhere, so I can stop bugging people here!

Thank you very much for your help!

8 May 2013, 6:47 PM
#10
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #10 by gjh42

This is mostly possible without altering Zen Cart behavior or coding. Your generic product can have a text attribute which can be populated with all the specific information during the "add to cart" process. DrByte has posted code which will add a particular product to the Zen Cart shopping cart. It may need tweaking to also add the attribute value. The part I am not sure about is inserting the custom price into the product in the order. I'm sure it's possible, but don't know how, or if it would require code modification. (All prices are held in the database, and just popping a price onto a product in an order might be tricky.) There is a common method of getting a customer-derived price, but it requires setting the product price to 1 and adjusting the quantity to get the desired total price. This would conflict with the possibility of ordering more than one badge with particular details. You could have another attribute field which accepts the total price as a string, and some code to intercept that and convert it into the product's price.

9 May 2013, 8:41 PM
#11
ljudice avatar

ljudice

New Zenner

Join Date:
May 2013
Location:
Western NJ
Posts:
7
Plugin Contributions:
0

Post #11 by ljudice

Thanks for these additional tips!! I think I have the picture now!!!

  • Lou
9 May 2013, 10:43 PM
#12
ljudice avatar

ljudice

New Zenner

Join Date:
May 2013
Location:
Western NJ
Posts:
7
Plugin Contributions:
0

Post #12 by ljudice

I take it DrByte's code would be posted in " All Other Contributions/Addons and child forums "

10 May 2013, 5:35 AM
#13
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #13 by gjh42

Afraid not... it was in some thread where someone was asking how to add a product to the shopping cart from an external page. I couldn't tell you now exactly where it was or the exact words to search for; try it and if you find the post, please mention it here to help make it easier to get to.