SAP OCI integration without SAP - http

Our supplier requires us to use SAP Open Catalog Interface to order goods.
However we do not have SAP, so I should implement it from scratch.
Has anyone done this and is willing to share his experience / hints on where to start etc.?
This is the OCI doc I follow.

I can't help you in implementing your system (too broad and not enough information - and off topic for this site :))
But I can give a process description to give you a start point.
Your supplier has to give you a link to the OCI-Shop (including login credentials).
You attach a parameter hookurl with your landing page to this URL.
So you get something like:
https://www.mysupplier.com/OCI/ocilogin?user=yourname&password=yourpassword&hookurl=https://example.net/oci_receive_from_supplier_X
When you call this URL, it directs you to the shop of the supplier, where you can select materials.
When you finished, you don't order, but you request the order data and the supplier sends a formula to your hookurl https://example.net/oci_receive_from_supplier_X
The formula data may look like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
<form name="SUBMITFORM" action="https://example.net/oci_receive_from_supplier_X" method="post" id="SUBMITFORM">
<input type="hidden" name="NEW_ITEM-MATNR[1]" value="">
<input type="hidden" name="NEW_ITEM-QUANTITY[1]" value="0000000000001">
<input type="hidden" name="NEW_ITEM-DESCRIPTION[1]" value="article description">
<input type="hidden" name="NEW_ITEM-VENDORMAT[1]" value="4711">
<input type="hidden" name="NEW_ITEM-PRICE[1]" value="56.95">
<input type="hidden" name="NEW_ITEM-CURRENCY[1]" value="EUR">
<input type="hidden" name="NEW_ITEM-UNIT[1]" value="PCE">
<input type="hidden" name="NEW_ITEM-LEADTIME[1]" value="5">
<input type="hidden" name="NEW_ITEM-LONGTEXT_1:132[]" value="article description">
<input type="hidden" name="NEW_ITEM-VENDOR[1]" value="987654">
<input type="hidden" name="NEW_ITEM-CONTRACT[1]" value="">
<input type="hidden" name="NEW_ITEM-CONTRACT_ITEM[1]" value="">
<input type="hidden" name="NEW_ITEM-MATGROUP[1]" value="12345678">
<input type="hidden" name="NEW_ITEM-EXT_CATEGORY_ID[1]" value="12345678">
<input type="hidden" name="NEW_ITEM-EXT_SCHEMA_TYPE[1]" value="">
<input type="hidden" name="NEW_ITEM-CUST_FIELD1[1]" value="">
<input type="hidden" name="NEW_ITEM-CUST_FIELD2[1]" value="">
<input type="hidden" name="NEW_ITEM-CUST_FIELD3[1]" value="">
<input type="hidden" name="NEW_ITEM-CUST_FIELD4[1]" value="">
<input type="hidden" name="NEW_ITEM-CUST_FIELD5[1]" value="">
<input type="hidden" name="NEW_ITEM-MATNR[2]" value="">
<input type="hidden" name="NEW_ITEM-QUANTITY[2]" value="0000000000001">
<input type="hidden" name="NEW_ITEM-DESCRIPTION[2]" value="other article description">
<input type="hidden" name="NEW_ITEM-VENDORMAT[2]" value="4712">
<input type="hidden" name="NEW_ITEM-PRICE[2]" value="65.07">
<input type="hidden" name="NEW_ITEM-CURRENCY[2]" value="EUR">
<input type="hidden" name="NEW_ITEM-UNIT[2]" value="PCE">
<input type="hidden" name="NEW_ITEM-LEADTIME[2]" value="5">
<input type="hidden" name="NEW_ITEM-LONGTEXT_2:132[]" value="other article description">
<input type="hidden" name="NEW_ITEM-VENDOR[2]" value="987654">
<input type="hidden" name="NEW_ITEM-CONTRACT[2]" value="">
<input type="hidden" name="NEW_ITEM-CONTRACT_ITEM[2]" value="">
<input type="hidden" name="NEW_ITEM-MATGROUP[2]" value="12345678">
<input type="hidden" name="NEW_ITEM-EXT_CATEGORY_ID[2]" value="12345678">
<input type="hidden" name="NEW_ITEM-EXT_SCHEMA_TYPE[2]" value="">
<input type="hidden" name="NEW_ITEM-CUST_FIELD1[2]" value="">
<input type="hidden" name="NEW_ITEM-CUST_FIELD2[2]" value="">
<input type="hidden" name="NEW_ITEM-CUST_FIELD3[2]" value="">
<input type="hidden" name="NEW_ITEM-CUST_FIELD4[2]" value="">
<input type="hidden" name="NEW_ITEM-CUST_FIELD5[2]" value="">
</form>
<script language="JavaScript" type="text/javascript">
document.SUBMITFORM.submit();
</script>
</body>
</html>
Now your script has to extract the order data and you can do with it whatever you want (start an approval workflow, ...) and in the end you can order
(however you want. You can start an EDI process, or you send an order fax...) But this order process is outside the OCI itself.

Related

Convert input[type=file] to Base64 before submitting to HomeController

How can I convert 5 separate inputs shown below:
<form action="uploadImages" method="post" id="frm">
<input name="Img1" type="file" accept="image/*;capture=camera">
<input name="Img2" type="file" accept="image/*;capture=camera">
<input name="Img3" type="file" accept="image/*;capture=camera">
<input name="Img4" type="file" accept="image/*;capture=camera">
<input name="Img5" type="file" accept="image/*;capture=camera">
<input type="submit" value="Submit Form" class="UserSubmit" />
</form>
To Base64 string before it gets sent to the HomeController.
the file types will only be images. (png/jpg).

Wordpress Search Function With Mutiple Text Inputs

I need to create a wordpress search function with multiple text inputs
This is the code I have right now, which works fine. It searches for the keyword in the custom post type of "project_posts"
<form role="search" action="/" method="get" id="searchform">
<input type="text" name="s" placeholder="Search Projects"/>
<input type="hidden" name="post_type" value="project_posts" />
<input type="submit" alt="Search" value="Search" />
</form>
But what I want is something like this, with multiple text inputs.
<form role="search" action="/" method="get" id="searchform">
<input type="text" name="s" placeholder="Keyword"/>
<input type="text" name="s" placeholder="Location"/>
<input type="text" name="s" placeholder="Category"/>
<input type="text" name="s" placeholder="Material"/>
<input type="hidden" name="post_type" value="project_posts" />
<input type="submit" alt="Search" value="Search" />
</form>
This is how the client wants it, so that's what I need to provide.
Unfortunately, this code doesn't quite work. It generates this URL
example.com/?s=&s=&s=&s=&post_type=project_posts
And it only uses whatever is in the last search box for the actual search.
I'm a bit stuck with this one, any help is greatly appreciated.

Set a Virtual Page View with Universal GA

This is my HTML from. and i'm trying to set a Virtual Page View when submitting the form but i just can't make it work.
Pls advice
<form id="frmContact" action="post.php" method="post">
<div class="form-right-pnl">
<input type="text" class="required name" size="40" placeholder="×©× ×ž×œ×:" name="full_name">
<input type="text" class="required phone" size="40" placeholder="טלפון:" name="phone">
<input type="text" class="required email" size="40" placeholder='דו×"ל:' name="email">
<span>מ×שר קבלת ×—×•×ž×¨×™× ×¤×¨×¡×•×ž×™×™×</span>
<input type="checkbox" class="radio_btn" name="selling_a_property" checked value="Yes"/>
</div>
<div class="form-left-pnl" id='basic-modal'>
<input class="ddl_list" type="submit" value="" onClick=”_gaq.push([‘_trackEvent’, ‘Forms’, ‘Submit’]);” />
</div>
<div class="clear"></div>
</form>
Change this line
<input class="ddl_list" type="submit" value="" onClick=”_gaq.push([‘_trackEvent’, ‘Forms’, ‘Submit’]);” />
for
<input class="ddl_list" type="submit" value="" onClick=”_gaq.push(['_trackPageview', '/virtual-page-view-on-click-submit-button']);” />

WP e-commerce remove button

For adding a product to cart by id I've got this code:
<form class="product_form" enctype="multipart/form-data" action="<?php bloginfo('url');?>" method="post" name="1" id="product_143">
<input type="hidden" value="add_to_cart" name="wpsc_ajax_action">
<input type="hidden" value="143" name="product_id">
<button>+</button>
Is there a code to remove a item by id?
I've tried this:
<form action="<?php bloginfo('url');?>" method="post" class="adjustform remove">
<input type="hidden" name="quantity" value="0">
<input type="hidden" name="key" value="0">
<input type="hidden" name="wpsc_update_quantity" value="true">
<input type="submit" value="-">
</form>
But this removes the first item in the cart.

how to post and response to post

I have asp.net button, I want when click to post to the following link
https://www.cashu.com/cgi-bin/pcashu.cgi
with something parameters like the below form do
<form action="https://www.cashu.com/cgi-bin/pcashu.cgi" method="post">
<input type="hidden" name="merchant_id" value="XYZ">
<input type="hidden" name="token" value="66a31cd699d8d9cb454df1f6cec30c2c">
<input type="hidden" name="display_text" value="Baseball Hat">
<input type="hidden" name="currency" value="CSH">
<input type="hidden" name="amount" value="125">
<input type="hidden" name="language" value="en">
<input type="hidden" name="session_id" value="asdasd-234-asdasd">
<input type="hidden" name="txt1" value="item27">
<input type="submit" value="Pay with cashU!">
</form>
I want to do that programatically and catach the return response , and write it on text
any idea how to do that

Resources