Yeah, I've found it - not on my server, on my testserver it is enabled.
I will contact my host, and see, what to do.
Thanks for your help!
Hugs Micki
Printable View
Yeah, I've found it - not on my server, on my testserver it is enabled.
I will contact my host, and see, what to do.
Thanks for your help!
Hugs Micki
Yeah, now we have JSON support installed an the server, and all works!
Thank for your great help!
And for the wonderful mod :hug:
Hugs Micki
I'd like to do a similar API thing with an online art gallery I load my artwork up to. I'm not quite sure how to put it all together.
their help page is http://dart.fine-art.com/api/?i=21085
the code is something like this
$userID = 9991;
$password = "fiddlestix";
$action = "new";
$artistFirstName = "Pablo";
$artistLastName = "Picasso";
$price = 515.95;
$title = htmlentities(urlencode("Paloma en Bleu")); //url encode variables with spaces and special characters
$category = 5;
$urlArt = "http://www.fine-art.com/mypainting.gif";
$vendorCode = "pic12512" ;
$subject1 = 25;
$subject2 = 27;
$media1 = 56;
$urlReturn = "http://www.mysite.com/results.php";
$paypalEmail = "[email protected]";
$watermark = htmlentities(urlencode("© " . "My Name"));
//Redirect to API
$redirectTo = "https://dart.fine-art.com/api/process.asp" .
"?userID=" . $userID . "&password=" . $password . "&action=" . $action .
"&artistFirstName=" . $artistFirstName . "&artistLastName=" . $artistLastName .
"&price=" . $price . "&title=" . $title . "&category=" . $category . "&urlArt=" .
$urlArt . "&vendorCode=" . $vendorCode . "&subject1=" . $subject1 . "&subject2=" . $subject2 .
"&media1=" . $media1 . "&urlReturn=" . $urlReturn . "&paypalEmail=" . $paypalEmail .
"&watermark=" . $watermark ;
header("Location: $redirectTo") ;
Any help would be greatly appreciated.
So youre trying to have anything you upload to your store also submit to fine-art.com? Or use twitter?
nevermind i see what you meant:
K, Since I'm feeling generous:
open admin/includes/modules/update_product.php
the 2nd to last line of code (scroll all the way down) should look like this:
Delete it, and replace with this:PHP Code:
zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')));
change the top variables to reflect your fine-art.com infoPHP Code:
//D'art Api
//edit the following vars
$userID = 42146; //d'art userid
$password = "yourPassword"; //d'art password
$artistFirstName = "Jamie";
$artistLastName = "Taylor";
$paypalEmail = "jvptaylor##########################";
$store_url = 'http://www.htmyell.com'; //path to your store without the trailing "/"
$category = 5; //see [url]http://dart.fine-art.com/api/variables.asp#response[/url] for info
$subject1 = 25; //see [url]http://dart.fine-art.com/api/variables.asp#response[/url] for info
$subject2 = 27; //see [url]http://dart.fine-art.com/api/variables.asp#response[/url] for info
$media1 = 56; //see [url]http://dart.fine-art.com/api/variables.asp#response[/url] for info
$watermark = htmlentities(urlencode("© " . "Jamie Taylor"));
//do not edit the vars below
$prod_name = implode(" ", $products_name);
$prod_description = implode(" ", $products_description);
$prod_url = $store_url . '/index.php?main_page=product_info&cPath=' . $current_category_id . '&products_id=' . $products_id ;
$price = $products_price;
$title = htmlentities(urlencode($prod_name));
$action = "new";
$urlArt = $store_url . "/images/" . $products_image;
$vendorCode = $products_model; //uses zencart model number
$urlReturn = zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id . (isset($_GET['page']) ? '&page=' . $_GET['page'] : ''));
//Redirect to API and back to store front
$redirectTo = "https://dart.fine-art.com/api/process.asp" .
"?userID=" . $userID . "&password=" . $password . "&action=" . $action .
"&artistFirstName=" . $artistFirstName . "&artistLastName=" . $artistLastName .
"&price=" . $price . "&title=" . $title . "&category=" . $category . "&urlArt=" .
$urlArt . "&vendorCode=" . $vendorCode . "&subject1=" . $subject1 . "&subject2=" . $subject2 .
"&media1=" . $media1 . "&urlReturn=" . $urlReturn . "&paypalEmail=" . $paypalEmail .
"&watermark=" . $watermark ;
header("Location: $redirectTo");
//end of d'art api
go to http://dart.fine-art.com/api/variables.asp#response if you need help with them. and thats it, now everytime you add a product in zencart, it will appear on your fine-art.com profile :D
if youd rather download and replace your existing update_product.php here's a link http://htmyell.com/images/share/update_product.zip NOTE: this does not have AutoTweet installed its just the default version and d'art api.
That is absolutely fantastic!
Awsome! Thanks soooooo much, I'm still getting my head around this API thing.
is there any way that i can just limit it to a particular category?
replace current code with:
on the first line where you seePHP Code:
//D'art Api
if ($current_category_id == 3) { //change this line to category id
//edit the following vars
$userID = 42146; //d'art userid
$password = "yourpassword"; //d'art password
$artistFirstName = "Jamie";
$artistLastName = "Taylor";
$paypalEmail = "jvptaylor##########################";
$store_url = 'http://www.htmyell.com/zencart'; //path to your store without the trailing "/"
$category = 5; //see http://dart.fine-art.com/api/variables.asp#response for info
$subject1 = 25; //see http://dart.fine-art.com/api/variables.asp#response for info
$subject2 = 27; //see http://dart.fine-art.com/api/variables.asp#response for info
$media1 = 56; //see http://dart.fine-art.com/api/variables.asp#response for info
$watermark = htmlentities(urlencode("© " . "Jamie Taylor"));
//do not edit the vars below
$prod_name = implode(" ", $products_name);
$prod_description = implode(" ", $products_description);
$prod_url = $store_url . '/index.php?main_page=product_info&cPath=' . $current_category_id . '&products_id=' . $products_id ;
$price = $products_price;
$title = htmlentities(urlencode($prod_name));
$action = "new";
$urlArt = $store_url . "/images/" . $products_image;
$vendorCode = $products_model;
$urlReturn = zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id . (isset($_GET['page']) ? '&page=' . $_GET['page'] : ''));
//Redirect to API and back to store front
$redirectTo = "https://dart.fine-art.com/api/process.asp" .
"?userID=" . $userID . "&password=" . $password . "&action=" . $action .
"&artistFirstName=" . $artistFirstName . "&artistLastName=" . $artistLastName .
"&price=" . $price . "&title=" . $title . "&category=" . $category . "&urlArt=" .
$urlArt . "&vendorCode=" . $vendorCode . "&subject1=" . $subject1 . "&subject2=" . $subject2 .
"&media1=" . $media1 . "&urlReturn=" . $urlReturn . "&paypalEmail=" . $paypalEmail .
"&watermark=" . $watermark ;
header("Location: $redirectTo");
//end of d'art api
} else {
zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')));
}
change "3" to your art's category idPHP Code:
if ($current_category_id == 3) {
(you can get this by looking at your categories url, i.e.;
http://htmyell.com/zencart/index.php?main_page=index&cPath=4)
you are gorgeous, thanks so much!
[QUOTE=jamielife;861611]
$subject1 = 25; //see http://dart.fine-art.com/api/variables.asp#response for info
$subject2 = 27; //see http://dart.fine-
it allows you to choose up to 3 of each of the options, can i do that?
do I just use commas to separate the different selections?
hmmm well this would only work if your art falls into the same 3 subjects everytime.