Post by stickerworld » Wed Feb 23, 2011 12:32 am

I've been looking around trying to see if I can find some information on External Linking with OpenCart and another system we use (Realtimedesigner.com) You can see this realtimedesigner at work at our main site signsidesign.com clicking on products, then on a product type, then on one of our premade templates....

What this does is leave our site, and loads that template you clicked on into the realtimedesigner.com site, there our customer can customize there template, and add it to a cart "On the Real Time Designer" website.... This is where we would like to change...

After they submit there design, it uses the realtimedesigner shopping cart... Now, realtimedesigner allows us to use what they call a External Link Notification, where we can take any part of the customer order, and pass it to our own shopping cart "OpenCart" and the customer can finish checking out using our "OpenCart" on "Our Own Server". We can pass any information we want, but need to link it to the OpenCart veriables. Thais is where I can't seem to get information on this...

Below is what they offer for the help section of this External Modual.....

-------------------------------------------------------------------------------
EXTERNAL MODULE HELP
This module works very similar to the "Email & Export Templates" module.
FORMSEND FIELDS
There are just some new fields here, in the "FORMSEND FIELDS" area, which are very important:
- EXTERNAL FORM: Target URL Page
- EXTERNAL FORM: Target Port
- EXTERNAL FORM: Custom Params
- EXTERNAL FORM: Submit method

"Target URL Page" is essentially where the module sends the data.
For example, something like "http://mydomain.com/mypage.php"
Basically, the same value you would insert in a form as "action".

"Target port" is the port you want to address while sending datas.
Normally, for webservers, this port is 80. But it may happen that, for security reasons, you need to address a different port.

"Custom Params" is the place to enter your custom form fields, if needed.
If filled, it must be written in querystring form, so something like:
param1=abc&param2=123&param3=helloworld etc...

"Submit method" is how to send datas.
If it's set to "Silent", the checkout will work normally, but you will have your form sent to your processing page also.
If it's set to "Redirect", the checkout will redirect the user to your processing page, no matter if paypal or quote orders are set.
"Redirect" is the option you want to use if, for example, you want to complete the checkout in a cart placed on your systems.
OTHER FIELDS
These fields are just like the ones in "Email & Export Templates".
Just fill the field relative to the filed you're interested in.
For example, if you want your "form" to send the order# value as "ord_id", just write "ord_id" in the "ORDER: Order ID" row.

- ORDER FIELDS
They contains only general order datas, so they will be passed only once.

- "ITEMS FIELDS"
As an order may contain more tham one item, the fieldnames you'll write for items will have a postfix indicating the item#.
For example: let's say you wrote "productname" as the value for "ITEM: product name".
If the order has only one item, the field will be passed as "productname_1".
If the order has 3 items, the fields will be passed as "productname_1", "productname_2" and "productname_3".

- "SIDES FIELDS"
Again, an item may contain more tham one side.
So, the fieldnames you'll write for sides will have a postfix indicating the item# and the side#.
For example: let's say you wrote
- "productname" as the value for "ITEM: product name"
- "width" as the value for "SIDE: Inches Width Size"

If the order has 2 items, and the first has only one side while the 2nd has 3, the fields will be passed as:
"productname_1"
"productname_2"
"width_1_1"
"width_2_1"
"width_2_2"
"width_2_3"
THE "Simulate results with this order id" BUTTON
Be sure everything works as expected before deployment. Verify using the SIMULATE button!
You can fill the "Order ID" field with a valid ord# you have.
Clicking the button, you will see a popup that will show all the fieldsnames and values your actual setup would have created on that order submittal.
In the popup you will also see the option of testing a real send to your page:
in case you want to try data collection, you can use that option to really "send" the order just as it would happen while in use.
SOME HINTS - 1: a simple PHP example
As you probably guessed, it would be nice for your target script to know the number of items and sides.
You can obtain them using the "ORDER: ITEMS # Inside Order" and "ITEM: SIDES # Inside Item" codes.
For example: let's say you wrote
- "ordnum" as the value for "ORDER: Order ID"
- "orddate" as the value for "ORDER: Insert Date"
- "itemscount" as the value for "ORDER: ITEMS # Inside Order"
- "sidescount" as the value for "ITEM: SIDES # Inside Item"
- "productname" as the value for "ITEM: product name"
- "width" as the value for "SIDE: Inches Width Size"
- "height" as the value for "SIDE: Inches Height Size"
- "thumbnail" as the value for "SIDE: GIF thumbnail version"
- "pngfile" as the value for "SIDE: Designer size PNG version"

The items# will be passesd as "itemscount";
the sides# for each item will be passed as "sidescount_1", "sidescount_2", etc....
In PHP, it would have been:

SAMPLE CODE:
<?
$allpagevaluesarray=array_merge($_POST, $_GET);
foreach (array_keys($allpagevaluesarray) as $key) {
if (!get_magic_quotes_gpc()) {
$$key=$allpagevaluesarray[$key];
} else {
$$key=stripslashes($allpagevaluesarray[$key]);
}
}

echo "<center>ORDER #".$ordnum.", sent on ".$orddate."</center><br>\n";
echo "there are ".$itemscount." items<br>Sizes and images are:<br><br>\n";
for ($i=1; $i<=$itemscount; $i++) {
eval ('$sidescount=$sidescount_'.$i.';');
for ($j=1; $j<=$sidescount; $j++) {
eval ('$width=$width_'.$i.'_'.$j.';');
eval ('$height=$height_'.$i.'_'.$j.';');
eval ('$thumbnail=$thumbnail_'.$i.'_'.$j.';');
eval ('$pngfile=$pngfile_'.$i.'_'.$j.';');
echo "ITEM ".$i." SIDE ".$j." size: ".$width." X ".$height."<br>\n";
echo "ITEM ".$i." SIDE ".$j." thumbnail: ".$thumbnail."<br>\n";
echo "ITEM ".$i." SIDE ".$j." pngfile: ".$pngfile."<br>\n";
}
echo "<br>\n";
}
?>


END OF SAMPLE CODE

SOME HINTS - 2: using PayPal cart
This is an example where the "Custom Params" fields is useful.
As you probably know, the PayPal buttons has to be filled with some param/value pairs.
For example, a standard "add to PayPal cart" button has the following fields:

target form page => https://www.paypal.com/cgi-bin/webscr
item_name => An item name
amount => Total order price
add => 1
cmd => _cart
businness => yourpaypalemail
currency_code => USD
bn => PP-ShopCartBF
no_shipping => 0
no_note => 1

To have customers adding orders in a PayPal cart on submittal, you would need to do something like:

- "Redirect" as the value of "EXTERNAL FORM: Submit method"
- "https://www.paypal.com/cgi-bin/webscr" as the value for "EXTERNAL FORM: Target Url Page"
- "80" as the value for "EXTERNAL FORM: Target port"
- "item_name" as the value for "ORDER: Order ID"
- "amount" as the value for "ORDER: Total Order Price"

As you can see, you now miss some fields which are not part of the generator:
add, cmd, businness, currency_code, bn=PP-ShopCartBF, no_shipping and no_note

To pass them to the PayPal script, you can use "Custom Params". Here's how they should be compiled for this example:

add=1&cmd=_cart&businness=yourpaypalemail&currency_code=USD&bn=PP-ShopCartBF&no_shipping=0&no_note=1

Place all the above as the value for "EXTERNAL FORM: Custom Params" (changing the "yourpaypalemail" value, of course!)

At order submittal a setup like this will simply lead your customer in PayPal's site, with a cart and the designer item added to it.
There are various PayPal params to control what should happen there: again, you can set them all in "Custom Params" as described above.
------------------------------------------------------------------------------------------

Thats about all they offer you and they wont help if I call.

Below is the fields I can edit within the External Notification Modual on my admin system in Realtimedesigner.

VARIABLE NAME VARIABLE DESCRIPTION
FORMSEND FIELDS
EXTERNAL FORM: Target Url Page
EXTERNAL FORM: Target port (generally 80)
EXTERNAL FORM: Custom Params (in querystring form)
Silent Redirect EXTERNAL FORM: Submit method
EXTERNAL VARIABLES FIELDS
EXTERNAL VARIABLE:
ORDER FIELDS
ORDER: Order ID
ORDER: Insert Date
ORDER: Total Order Price
ORDER: Total Shipping Price
ORDER: Shipping Method
ORDER: Sales Tax On Price (%)
ORDER: Sales Tax On Ship (%)
ORDER: Sales Tax On Price (value)
ORDER: Sales Tax On Ship (value)
ORDER: Total Order Price With Ship And Taxes Included
ORDER: Total Order Items
ORDER: Total Order Weight
ORDER: ITEMS # Inside Order
ORDER: User Order Revise Link (not for subjects)
USER DEFINED: Address
USER DEFINED: City
USER DEFINED: Company
USER DEFINED: Email
USER DEFINED: Name
USER DEFINED: Phone
USER DEFINED: State
USER DEFINED: Zip
ONLINE PAYMENT FIELD: Bill-Ship
ONLINE PAYMENT FIELD: Billing City
ONLINE PAYMENT FIELD: Billing Country
ONLINE PAYMENT FIELD: Billing Name
ONLINE PAYMENT FIELD: Billing State (US only)
ONLINE PAYMENT FIELD: Billing Street Address
ONLINE PAYMENT FIELD: Billing Zip
ONLINE PAYMENT FIELD: E-mail
ONLINE PAYMENT FIELD: Phone
IN DESIGNER FIELD: Address
IN DESIGNER FIELD: City
IN DESIGNER FIELD: Company
IN DESIGNER FIELD: Email
IN DESIGNER FIELD: Fax
IN DESIGNER FIELD: Name
IN DESIGNER FIELD: Phone
IN DESIGNER FIELD: State
IN DESIGNER FIELD: Zip
ITEMS FIELDS
ITEM: Item Part Number
ITEM: product name
ITEM: size name
ITEM: product description
ITEM: product long description
ITEM: Cut finished product to shape
ITEM: Unit Price
ITEM: Unit Weight
ITEM: Quantity
ITEM: Item Price details (incl. Addons)
ITEM: Item Subsizes details
ITEM: Total Item Price
ITEM: SIDES # Inside Item
ITEM: BG Color RGB Colors
ITEM: Eventual source template name
SIDES FIELDS
SIDE: Inches Width Size
SIDE: Inches Height Size
SIDE: Designer size PNG version
SIDE: Designer size JPG version
SIDE: GIF thumbnail version
SIDE: Text Line 1
SIDE: Text Line 2
SIDE: Text Line 3
SIDE: Text Line 4
SIDE: Text Line 5
SIDE: Text Line 6
SIDE: Text Line 7
SIDE: Text Line 8
SIDE: Text Line 9
SIDE: Text Line 1 Font-Family Name
SIDE: Text Line 2 Font-Family Name
SIDE: Text Line 3 Font-Family Name
SIDE: Text Line 4 Font-Family Name
SIDE: Text Line 5 Font-Family Name
SIDE: Text Line 6 Font-Family Name
SIDE: Text Line 7 Font-Family Name
SIDE: Text Line 8 Font-Family Name
SIDE: Text Line 9 Font-Family Name
SIDE: Text Line 1 RGB Colors
SIDE: Text Line 2 RGB Colors
SIDE: Text Line 3 RGB Colors
SIDE: Text Line 4 RGB Colors
SIDE: Text Line 5 RGB Colors
SIDE: Text Line 6 RGB Colors
SIDE: Text Line 7 RGB Colors
SIDE: Text Line 8 RGB Colors
SIDE: Text Line 9 RGB Colors
SIDE: Text Line 1 Color Names
SIDE: Text Line 2 Color Names
SIDE: Text Line 3 Color Names
SIDE: Text Line 4 Color Names
SIDE: Text Line 5 Color Names
SIDE: Text Line 6 Color Names
SIDE: Text Line 7 Color Names
SIDE: Text Line 8 Color Names
SIDE: Text Line 9 Color Names
SIDE: Clipart 1
SIDE: Clipart 2
SIDE: Clipart 3
SIDE: Clipart 4
SIDE: Clipart 5
SIDE: Clipart 6
SIDE: Clipart 7
SIDE: Clipart 8
SIDE: Clipart 9
SIDE: Clipart 1 RGB Colors
SIDE: Clipart 2 RGB Colors
SIDE: Clipart 3 RGB Colors
SIDE: Clipart 4 RGB Colors
SIDE: Clipart 5 RGB Colors
SIDE: Clipart 6 RGB Colors
SIDE: Clipart 7 RGB Colors
SIDE: Clipart 8 RGB Colors
SIDE: Clipart 9 RGB Colors
SIDE: Clipart 1 Color Names
SIDE: Clipart 2 Color Names
SIDE: Clipart 3 Color Names
SIDE: Clipart 4 Color Names
SIDE: Clipart 5 Color Names
SIDE: Clipart 6 Color Names
SIDE: Clipart 7 Color Names
SIDE: Clipart 8 Color Names
SIDE: Clipart 9 Color Names
SIDE: Shape 1 RGB Colors
SIDE: Shape 2 RGB Colors
SIDE: Shape 3 RGB Colors
SIDE: Shape 4 RGB Colors
SIDE: Shape 5 RGB Colors
SIDE: Shape 6 RGB Colors
SIDE: Shape 7 RGB Colors
SIDE: Shape 8 RGB Colors
SIDE: Shape 9 RGB Colors
SIDE: Shape 1 Color Names
SIDE: Shape 2 Color Names
SIDE: Shape 3 Color Names
SIDE: Shape 4 Color Names
SIDE: Shape 5 Color Names
SIDE: Shape 6 Color Names
SIDE: Shape 7 Color Names
SIDE: Shape 8 Color Names
SIDE: Shape 9 Color Names

---------------------------------------------------------------------
So I guess my question would be is if this is anything you could help me with or know someone that may be able to? I would like to use all of the OpenCart features, and only the designer part of the Real Time Designer, But I would need it to pass back the information for the orders...

Any help with this would be great.

Ken

Newbie

Posts

Joined
Wed Feb 23, 2011 12:04 am

Post by ecomensions » Fri Apr 08, 2011 6:14 pm

Hi there stickerworld,

I've worked with RealTimeDesigner before, not integrating it with a cart, but using their API methods. If you're interested, we can develop a custom modification for you? We can offer you a fairly competitive price - less than $50.00 USD - if you are interested.

Give me a PM if you want to hear more.

Regards,
ecomensions

Ecommerce Extensions - Need custom development work? Feel free to send us a PM at anytime to discuss things further.


Newbie

Posts

Joined
Thu Mar 17, 2011 10:19 pm
Who is online

Users browsing this forum: No registered users and 5 guests