Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can I add items TO an external shopping cart from osc?


cconlin

Recommended Posts

Hi everyone,

My client wants me to connect the new shopping cart I'm creating (OSC version 2.3.1) to her publisher's shopping cart checkout. How do I do this?

It sounds crazy, but my client does not want to set up an online gateway/merchant account, and she has been sending online customer orders to her publisher for processing. I have been through the ringer trying to get her onboard with PCI compliance, and I think I need to just redirect customers from her site to her publisher's shopping cart for check out. Other small companies with similar products connect directly to the publisher when an item is added to the cart.

 

 

Here's my dilemna:

How do I add items from the OSC site to the publisher's site? The url they have given me uses cfm ... and I have configured and set up osCommerce using php. Is it even possible? Here's the url the publisher gave me to post items to (changed name to generic):

http://www.genericpublisher.com/e-Store/Cart/externalCart.cfm?Action=Add&ItemID=

 

 

Can I allow the customer to finish shopping on our site, and then when the customer clicks on CHECKOUT, redirect them and send all the products w/variables to the publisher's cart? For instance, add multiple items to the shopping cart on www.mysite.com, and then send all variables to the shopping cart on www.genericpublisher.com. Can I do that???

 

I am stumped. You may have seen my other posts regarding PCI compliance, etc., it's been months now. I just want to get this shop online! Thank you all so much for any help or advice you can give.

 

Cindy

Link to comment
Share on other sites

Cindy,

 

Although it MAY be possible to pull cart variables from OSC into the other cart, I would expect that you will have a hard time mapping the variables and converting them to integrate into the publishers cart. You are looking at a lot of custom coding.

 

 

The original suggestion is valid......have you client sign up with an online payment processor and then have her pay the publisher for the items sold. I know the publisher has expectations and so does the client as you previous post stated. But, the two need to come to an agreement so they both profit from the arrangement.

 

 

 

 

Chris

Link to comment
Share on other sites

Hi Chris,

I keep forgetting the hiccup is not just the payment arrangement, but that my client does not have access to the publisher's inventory and shipping data. The publisher will not/cannot charge the customer until items are shipped. Some items might be back-ordered and charged separately. My client currently does not handle any of that, shipping or inventory or logistics.

 

As much as I want to persuade my client to add online credit card processing to her current merchant account (only $9 extra monthly), she needs to hand the order off to the publisher and let them charge when/as needed for shipping the items. I keep forgetting about that when I advocate processing the payments and paying the publisher for items.

 

So given that information (sorry for the omission!!), I figure I have 3 choices:


  1.  
  2. pass items from osc to the publisher's cart for processing,
  3. implement a new shopping cart system using coldFusion so I can pass variables easily (essentially starting over - YUCK!), or
  4. use the design I've created to skin her current hosted cart (not very flexible fields or displays) and leave the payment system in place (sketchy!!).

 

Would you agree that passing items to the publisher's cart is the least problematic? Of course, my client wants the customer to be able to finish shopping on her site before going to her publisher's webcart, but if that's too difficult, I can add the items to the publisher's cart as they are added (i.e., one at a time) to the cart.

 

The publisher gave me urls of 2 clients that use their webcart. One uses coldFusion, and the other actually uses php. It's quirky and not perfect, especially for those who use tabbed browsing and block pop-ups, but is it possible to implement with osc? (and if yes, how? I'm confused by the different variable posting methods...)

 

Thank you so much!

Cindy

Link to comment
Share on other sites

Cindy,

 

Have you considered altering the oscommerce cart to NOT bill the client, but only take the order ? This would allow the client to email the order directly to the publisher to check stock and bill the customer according before shipping ?

 

So, your client would get a copy of the order in admin and by email, the publisher would get a copy of the order by email. The publisher would then contact the customer with shipping/billing details and collect credit card information.

 

This sounds like a daunting process, but you could automate some of it by creating a 'trigger' from the publishers site to your clients SQL database to update the status automatically upon shipping.

 

 

I am just throwing ideas out there, the whole situation is messy.

 

That or your option 3 would be really the only solutions. #3 costing much less in my opinion.

 

 

 

Chris

Link to comment
Share on other sites

I suppose if the publisher is willing to contact the client for credit card information, that could work. But so much would be left up in the air.

If I were a customer and I placed an order without entering credit card info, I would not know if the order went through. Of course a statement would say, "Someone from Publisher will contact you for your payment information," but that seems sketchy. As a customer I want to complete the transaction right then and there, and not go back to it later. I'll run it by her as an option, though. Thank you for the idea. I've been throwing them [ideas] out there for a while now ...

 

Is there no way to add the item to the publisher's cart? They seem to do it successfully on that 2nd link (hildegard). Are there problems I am not seeing, aside from the overall clunky mess? It looks like they scripted an onClick event to their "Add to Cart" buttons that brings the item directly to the publisher's cart. Yes it's clunky, but it gets there. I'm not trying to be inflexible about it, but if it is an option, I'd like to test it at least. I don't like it, but I'd rather utilize what I've configured in osCommerce and get to use the catalog feature for the client side.

 

Customers who use tabbed browsers, turn off javascript, or block pop-up windows - they would have to enable it to use the publisher's site. Annoying, but it is a niche market, and they can't really get this sheet music anywhere but my client or her publisher. So, in a way it's a cop-out, but also just playing the cards dealt. What do you think?

Link to comment
Share on other sites

I personally would contact the publisher and ask for recommended shopping cart systems they can support. Osc, wasn't built for this.

 

If you have the api info you could actually setup a Shop with straight html type shop.

Link to comment
Share on other sites

Thanks, Don. I'm not sure exactly what you mean by a straight html shop, though. I don't think I've ever set up an api either (I've read about them but forget what they are)

 

Since I already have the database configured with 400+ items, extra fields, etc., can I keep the db setup and osc page/category displays and just make the "add to cart" buttons be straight html? Hard-code them to pass the data to the publisher's cart with an onClick event? Sorry if I'm being thick ... I am pretty new at this. I've passed data to 3rd party carts before, like Americart or Paypal, but never done this sort of full build thing.

 

Thank you :)

Link to comment
Share on other sites

Actually they do not seem to be integrated in any way..so it should be fairly easy if you just wanted that kind of set-up.

 

 

1. In the shop admin add/edit products screen add in the products add to cart link string in the filed labeled: Products URL: (without http://)

 

2. Modify the "add to cart" button in the product_info.php page to be a "link" button and clicking on it sending you to the link added as: Products URL: (without http://) for that product.

Link to comment
Share on other sites

Thanks Nick. I am not sure I understand what to add in the add/edit products screen.

In #1 above, do you mean to put the code for an "add to cart" button inside the box for "product url"?

And in #2 above, do I remove the following draw-button code and replace with a straight html/image link?

 <div class="buttonSet">
   <span class="buttonAction"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span>

 

Actually there's an error on my "add new product" screen in admin, and I have no idea when it appeared - since I didn't use that screen to input products (I used easy populate).

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /home1/gnarlysk/public_html/fallshousepress/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /home1/gnarlysk/public_html/fallshousepress/admin/includes/classes/object_info.php on line 18

 

Here is the code for object_info.php, do you see what is wrong with it? I did not change this file at all since install.

<?php
 class objectInfo {

// class constructor
   function objectInfo($object_array) {
     reset($object_array);
     while (list($key, $value) = each($object_array)) {
       $this->$key = tep_db_prepare_input($value);
     }
   }
 }
?>

 

ack! Thanks for any insight you may have!!!

Link to comment
Share on other sites

yes, you do remove the submit form action button and replace it with a link button

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /home1/gnarlysk/public_html/fallshousepress/admin/includes/classes/object_info.php on line 17

 

Basically means that some required "product/manufacturer/category" info is missing.

Link to comment
Share on other sites

Basically means that some required "product/manufacturer/category" info is missing.

 

Thanks for that - I never noticed in my admin section that there is no place to choose a category when adding a new product. And, the category names don't show up. I must have goofed somewhere when I added the extra product fields, because they all display perfectly and the warnings display (about the variables not being an array or object) just below that. I have to figure that out!

 

And I created the url in php, concatenating the url from the publisher with my products_model string, and was successful!! It added the product to the publisher's cart! woo-hoo! It's a big step, for now.

One thing I'm not sure how to do is to open the link in a sized pop-up window instead of just a new window created by my link target="_blank" - is there something I can change in the code below to create a mini-window? The other company used a javascript onclick event paired with a function.

    <?php 
 $presser_url = 'http://www.presser.com/e-Store/Cart/externalCart.cfm?Action=Add&ItemID=' ;
?>
   <?php echo '
<p><a href="' . $presser_url . $product_info['products_model'] . '" target="_blank"> Add to Pressers cart </a> </p>';
?>

 

thanks again!

Link to comment
Share on other sites

just google for some javascript pop-up link code and i am sure you can find alot of examples

Link to comment
Share on other sites

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...