plz help, its not working ?
I'm workin on this problem... in the mean time, undo all the modifications you made.
Jamie Taylor
Htmyell Web Design and Development
ok for carts with mulitple languages that are getting the 'cannot redeclare class' error:
On the included update_product.php in /admin/modules, around line 128 you should see:
change it to:// bof Auto Tweet.
include 'twitter/twitter.php';
That should fix the problem.// bof Auto Tweet.
include_once 'twitter/twitter.php';
Jamie Taylor
Htmyell Web Design and Development
Download autotweet again.
Complete steps 1 through 3
(Step 4 is optional and does not need to be complete).
You should only edit lines 128 through 148 in the included update_product.php file.
Did you configure update_product.php properly and install in the admin/modules/ folder? Is the twitter folder installed in your admin folder?
If your store has multiple languages see the post immediately above this post.
Jamie Taylor
Htmyell Web Design and Development
I downloaded the autotweet again, completed steps 1 through 3, edited lines 128 through 148 in the included update_product.php file, configured update_product.php properly and install in the admin/includes/modules/ . Twitter folder installed in admin folder, Only language is English, BUT when i try add a product i get same error Fatal error: Uncaught exception 'BitlyException' with message 'Invalid headers (403)' in /home/pcitshop/public_html/admin/twitter/bitly.php:177 Stack trace: #0 /home/pcitshop/public_html/admin/twitter/bitly.php(382): Bitly->doCall('shorten', Array) #1 /home/pcitshop/public_html/admin/includes/modules/update_product.php(146): Bitly->shorten('http://www.pcit...') #2 /home/pcitshop/public_html/admin/product.php(62): require('/home/pcitshop/...') #3 {main} thrown in /home/pcitshop/public_html/admin/twitter/bitly.php on line 177
hmm i'm looking into it.
and you are running php 5/
and have cURL installed?
Jamie Taylor
Htmyell Web Design and Development
curl
cURL support enabled
cURL Information libcurl/7.19.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
PHP Version 5.2.10
Zen Cart 1.3.8a
ok lets try this;
Create a new file called: test.php
paste this code in it
enter your bit.ly username and api key inplace of the ones shown in red.<?php
$url = "http://www.test.com";
$aParameters['login'] = 'username';
$aParameters['apiKey'] = 'R_f5003d838cfcc1498a0e43';
$aParameters['version'] = '2.0.1';
$queryString = '';
foreach($aParameters as $key => $value) $queryString .= '&'. $key .'='. urlencode(utf8_encode($value));
$queryString = trim($queryString, '&');
$url .= '?'. $queryString;
$url = 'http://api.bit.ly/'. $url;
$options[CURLOPT_URL] = $url;
$options[CURLOPT_PORT] = 80;
$options[CURLOPT_FOLLOWLOCATION] = true;
$options[CURLOPT_RETURNTRANSFER] = true;
$options[CURLOPT_TIMEOUT] = 60;
$curl = curl_init();
curl_setopt_array($curl, $options);
$response = curl_exec($curl);
$headers = curl_getinfo($curl);
$errorNumber = curl_errno($curl);
$errorMessage = curl_error($curl);
curl_close($curl);
print_r($headers);
?>
upload the file to your server.
run it from your browser.
if all goes well, it should spit out an array, showing us what your headers look like.
if not, you should get a similar error, either way let me know what you get.
Jamie Taylor
Htmyell Web Design and Development