HairyJim Posted February 22, 2007 Share Posted February 22, 2007 Hi all. Has anyone done this or know of a contrib or even perhaps knows the hoops to go through to do this. We create quotes using our Order Processing system (Navision Attain), I can connect to this and pull out quote details using PHP & SQL. What I envisage is a user coming to the OsCommerce shop entering the sales quote number and contact ID no. bringing back the quote title & total price (keeping it simple to begin with) for the customer to see and then allow them to 'add to cart'. What I need to know is how can I insert the sales quote as an item in their shopping cart so they can go through the normal checkout procedure? I could do this as a seperate system but I would be duplicating what OsCommerce already does and I think it would be much nicer to have one central place for all things they may wish to purchase. Any thoughts? Jim Link to comment Share on other sites More sharing options...
Guest Posted February 22, 2007 Share Posted February 22, 2007 Hi all. Has anyone done this or know of a contrib or even perhaps knows the hoops to go through to do this. We create quotes using our Order Processing system (Navision Attain), I can connect to this and pull out quote details using PHP & SQL. What I envisage is a user coming to the OsCommerce shop entering the sales quote number and contact ID no. bringing back the quote title & total price (keeping it simple to begin with) for the customer to see and then allow them to 'add to cart'. What I need to know is how can I insert the sales quote as an item in their shopping cart so they can go through the normal checkout procedure? I could do this as a seperate system but I would be duplicating what OsCommerce already does and I think it would be much nicer to have one central place for all things they may wish to purchase. Are you able to connect to "Order Processing system (Navision Attain)" using web services ? i.e. real time quotes for shipping modules like FedEx are accessible through web services extraction layers. You would have to ask them if they have this. Ok - after searching google for about three seconds, here you go : http://www.google.ca/search?hl=en&q=Na...earch&meta= Link to DPF doc : http://www.kogun.is/lisalib/getfile.aspx?itemid=236 Corrie Link to comment Share on other sites More sharing options...
Velveeta Posted February 22, 2007 Share Posted February 22, 2007 Hi all. Has anyone done this or know of a contrib or even perhaps knows the hoops to go through to do this. We create quotes using our Order Processing system (Navision Attain), I can connect to this and pull out quote details using PHP & SQL. What I envisage is a user coming to the OsCommerce shop entering the sales quote number and contact ID no. bringing back the quote title & total price (keeping it simple to begin with) for the customer to see and then allow them to 'add to cart'. What I need to know is how can I insert the sales quote as an item in their shopping cart so they can go through the normal checkout procedure? I could do this as a seperate system but I would be duplicating what OsCommerce already does and I think it would be much nicer to have one central place for all things they may wish to purchase. Any thoughts? Jim You might be able to do this if you added a price field to the shopping_cart class's "contents" array, so that each product would be associated with a unique price for each customer, but you would have to change a few queries to pull that price instead of looking to the product catalog to pull a price from... Then you'd just construct a form to let them enter their quote number and contact ID, and make another database connection in the store to your Navision database, pull that info, grab the product associated with it, and add it to their cart with the price info it pulled for the quote... Richard. Richard Lindsey Link to comment Share on other sites More sharing options...
davidinottawa Posted February 22, 2007 Share Posted February 22, 2007 You might be able to do this if you added a price field to the shopping_cart class's "contents" array, so that each product would be associated with a unique price for each customer, but you would have to change a few queries to pull that price instead of looking to the product catalog to pull a price from... Then you'd just construct a form to let them enter their quote number and contact ID, and make another database connection in the store to your Navision database, pull that info, grab the product associated with it, and add it to their cart with the price info it pulled for the quote... Richard. Richard - of course you are right - but the remote application needs to be given access rights to a remote database. david Link to comment Share on other sites More sharing options...
Velveeta Posted February 22, 2007 Share Posted February 22, 2007 Richard - of course you are right - but the remote application needs to be given access rights to a remote database. david Well, I just assumed he has access credentials he could supply for it, because he said he could pull those quotes with PHP and SQL, so I'm guessing he may already have some kind of system in place for doing so... If so, he could just use the database connection class and specify those remote server/username/password details... However, this seems to me to be a pretty major undertaking, since the products_price field is so scattered throughout the entire store in various queries... That one modification to the shopping cart class would have a lot of queries to filter down to replacing :) Although, I guess if his business were solely based on quotes, he could just display all prices as 0 if he has a catalog that displays, and ignore the products_price field in those queries altogether, which would just default to 0 anyway... The only places it would be important would be in the shopping cart itself, and during checkout... Richard. Richard Lindsey Link to comment Share on other sites More sharing options...
HairyJim Posted February 23, 2007 Author Share Posted February 23, 2007 Hi guys, Thanks for the reponses. I do have access to the main Navision system using PHP & SQL over a DSN. My aim here is to not pull through the full item list of the quote to add each line to the cart but just to add a single line into the shopping cart with the title of the quote pulled from Navision and the total cost of all the items...thus allowing them to go through the shopping cart checkout process within OsCommerce. I still have normal items that i sell through the catalog so I dont want to do anything that would potentially break the normal running of selling items from the catalog. Im not sure how best to achieve this. I suppose my two options are: 1) Do a seperate system for accepting/purchasing quotes, with its own checkout process. 2) Integrate to OsCommerce (ideal soultion) With option 2 I envisage the user filling in the form and submitting. Pulling the main data in (title & total cost - they have the paper quote in front of them) and then allowing them to 'add to cart'. Now Im not sure if it is possible to add a line to the cart that does not exist within the OsCommerce catalog. Or could I create a temporary line in the product table and fill in the details when they click 'add to cart'. Then when they have checked-out delete the line in the product table. Hmmm - Im sorry this may seem like a ramble.... If anyone could perhaps have a brain splurge and know a better/different way or perhaps thinks "yup temporary product lines is a good idea" and could elaborate on their idea then I would be a very happy man. Link to comment Share on other sites More sharing options...
Velveeta Posted February 23, 2007 Share Posted February 23, 2007 Hi guys, Thanks for the reponses. I do have access to the main Navision system using PHP & SQL over a DSN. My aim here is to not pull through the full item list of the quote to add each line to the cart but just to add a single line into the shopping cart with the title of the quote pulled from Navision and the total cost of all the items...thus allowing them to go through the shopping cart checkout process within OsCommerce. I still have normal items that i sell through the catalog so I dont want to do anything that would potentially break the normal running of selling items from the catalog. Im not sure how best to achieve this. I suppose my two options are: 1) Do a seperate system for accepting/purchasing quotes, with its own checkout process. 2) Integrate to OsCommerce (ideal soultion) With option 2 I envisage the user filling in the form and submitting. Pulling the main data in (title & total cost - they have the paper quote in front of them) and then allowing them to 'add to cart'. Now Im not sure if it is possible to add a line to the cart that does not exist within the OsCommerce catalog. Or could I create a temporary line in the product table and fill in the details when they click 'add to cart'. Then when they have checked-out delete the line in the product table. Hmmm - Im sorry this may seem like a ramble.... If anyone could perhaps have a brain splurge and know a better/different way or perhaps thinks "yup temporary product lines is a good idea" and could elaborate on their idea then I would be a very happy man. Actually, halfway through reading this post, I was thinking a temp item would be a good idea as well... You could either call it "Your complete quote" or something like that, or just make it a dummy item, make a define in one of your files (probably configure.php) for the products_id value, so you wouldn't have to hardcode that id value anywhere, you could just query for it by like DUMMY_PRODUCTS_ID, and then either assign it a name value of all of the individual items, comma-separated into 1 name, or just call it their complete quote, or whatever, and assign the price on the fly... You'd still have to put checks in various places, but you could just make it conditional and say like, if products_id == DUMMY_PRODUCTS_ID, then use some new field you add to the shopping_cart class, like quoted_price, rather than final_price which is used for regular cart items... Richard. Richard Lindsey Link to comment Share on other sites More sharing options...
HairyJim Posted February 23, 2007 Author Share Posted February 23, 2007 So when they clicked 'add to cart' once the quote is brought back to them am I right in thinking I would do an update to 'products' table where products_id = x. Updating the products_price value and the description in the products_name. Then call the function that adds that item to the cart. This would then allow for all the normal functions of Os to work on the item thereafter I need to map this out...logically. Link to comment Share on other sites More sharing options...
Velveeta Posted February 23, 2007 Share Posted February 23, 2007 So when they clicked 'add to cart' once the quote is brought back to them am I right in thinking I would do an update to 'products' table where products_id = x. Updating the products_price value and the description in the products_name. Then call the function that adds that item to the cart. This would then allow for all the normal functions of Os to work on the item thereafter I need to map this out...logically. No, you wouldn't want to do it that way, otherwise, if there were anyone else on the site at the same time, and were getting their own quote added to their cart, the 2 of them would be overwriting each others' quote data since it's stored under 1 product id in the database... You'd have to do this at the code level... Richard. Richard Lindsey Link to comment Share on other sites More sharing options...
HairyJim Posted February 26, 2007 Author Share Posted February 26, 2007 No, you wouldn't want to do it that way, otherwise, if there were anyone else on the site at the same time, and were getting their own quote added to their cart, the 2 of them would be overwriting each others' quote data since it's stored under 1 product id in the database... You'd have to do this at the code level... Richard. Ahh yes of course you are right. So this is best done within the cart class, since these records are held within a seperate table and unique for each 'shopper'. I will work on a solution and present it here. Thanks Jim Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.