News:

Support the VirtueMart project and become a member

Main Menu

3rd party hosted configurator

Started by karmicsynergy, July 11, 2013, 12:22:02 PM

Previous topic - Next topic

karmicsynergy


i have a customer that uses a 3rd party hosted configurator from one of there suppliers that can send back a form post with the built product back to url

but each configured item has a few products such as server,cpu,ram,hdd it looks like i get each part back with it price and since the item wont be in VM2 how could i add this item to the vm2 cart

any ideas i hope i expanded myself

balai

I am not sure that this very clear.
Can you explain a bit further?

karmicsynergy

ok let try this again

my customer already has a 3rd party hosted pc/laptop builder let them build a  system then it form post to send it back to a url of his choosing such as http://yourBasketURL for add it to the shopping basket and then the customer can checkout via VM2 or continue shopping

so what im trying to do is take the form post from this 3rd party hosted configurator to a VM2 cart as a product

from example below

<form action="http://yourBasketURL" method="post" name="frmExportToHost" id="frmExportToHost">
             <input type="hidden" id="SesID" name="SesID" value="CeQbflRTOZT-uu8b5Nz_uje" />
             <input type="hidden" id="Item[Prod1][PN]" name="Item[Prod1][PN]" value="470065-479"/>
             <input type="hidden" id="Item[Prod1][Qty]" name="Item[Prod1][Qty]" value="1"/>
             <input type="hidden" id="Item[Prod1][Description]" name="Item[Prod1][Description]" value="HP Proliant DL380 Server"/>
             <input type="hidden" id="Item[Prod1][Price]" name="Item[Prod1][Price]" value="979.49"/>

<input type="hidden" id="Item[Prod2][PN]" name="Item[Prod2][PN]" value="627165-B21"/>
               <input type="hidden" id="Item[Prod2][Qty]" name="Item[Prod2][Qty]" value="4"/>
               <input type="hidden" id="Item[Prod2][Description]" name="Item[Prod2][Description]" value="1TB 10k rpm SAS Hard Disk Drive"/>
               <input type="hidden" id="Item[Prod2][Price]" name="Item[Prod2][Price]" value="109"/>
</form>

franzpeter

#3
Do you mean that the supplier gives something preconfigured like a insert mask to built a built to order product? I do not think that this may work by default. These are somehow custom fields, but how should Virtuemart know, that those products exist. They are not in the VM database. Maybe there is an existing third party extension for that like customizable products or so, but I cannot imagine, that such an extension can call for remote stored products with remote stored prices. Or did I misunderstand something?

What you would need is a custom plugin, which shows up in the product details page, if that specific product is a built to order product. It should read from the remote host the product name and the price (for example with curl) and if the customer has finished the built to order process, the plugin should get that additional information together with the final price if the customer clicks for example on a button called 'Configure Now' and finally transfer that to the cart with the modified price and built to order option infos.
I think it would be possible. You may post a request into the Commercial Jobs board, maybe there is a developer, who can write such a plugin.

balai

If the configurator and Virtuemart are on the same domain, why don't you use Product Builder as pc/laptop configurator?
This works smoothly with Virtuemart.

Otherwise you will have to modify your configurator and develop a script to add multiple products to the VM cart.



karmicsynergy

there not on the same domain and all i get from from the configurator is the end product and prices

i was trying to avoid writing my own script to add/import the configurators returned products into VM2

balai

#6
I don't think that there is another way.
You should create a script in the 1st site which will pass the products to the cart using the product_ids as it they are in your vm shop.

So probably you should use curl or soap, to get the product ids and then pass them to the vm cart.
Also possibly you have to create 2 scripts 1 to the 1st site and 1 to the 2nd in order to make those 2 to communicate (get and set vars).

Another possible solution would be to create an order record as a mysql,csv or whatever format to the 1st site and then insert it into the database of the 2nd site. But in this case we are not talking about cart functionalities but just orders management.

karmicsynergy

plan B-ish


can i update the cost and add custom field (for the spec) of a product then push that new information into the card so i can use a generic product like laptop

$array = unserialize($_SESSION['__vm']['vmcart']);   //read the cart session
$products = $array->products;
$cart = VirtueMartCart::getCart();
  $quantityPost= 1;               
  $salescost= 100; 
  $cartattrabut= "productname - ram is 4gb - etc";       
  $virtuemart_product_id = 1;         
  $cart->add(array(1));