Zen Cart Logo
Forums / All Other Contributions/Addons / AutoTweet [support]

AutoTweet [support]

Views: 51,022

Results 81 to 100 of 264
21 Apr 2010, 6:08 AM
#81
jamielife avatar

jamielife

Zen Follower

Join Date:
Dec 2009
Location:
Richmond, VA
Posts:
161
Plugin Contributions:
0

AutoTweet [support]

Update: AutoTweet version 1.01 has just been submitted to zen cart for review and should be available soon.

It is basically updated to better integrate with zen cart version 1.3.9a and future releases. Also I have included some minor fixes for bugs/issues discovered on this forum including:

  • issue with descriptions not posting to twitter.
  • issue with 'cannot redeclare class' error.

Anyone wishing to install the upgrade now may do so at: http://htmyell.com/autotweet-v-1-01/

As always, please let me know what you think/if there's any problems.

Thanks,
Jamie

29 Apr 2010, 4:48 PM
#83
sumri avatar

sumri

New Zenner

Join Date:
Mar 2008
Posts:
46
Plugin Contributions:
0

Re: AutoTweet [support]

Hi,
great modules. save lot of my time.
i think there's a minor bugs in this module.
Right after after inserting new products into my website. The number of visitors showed quite a big number sometime '20++ guest' online, sometime '30++ guest online'.
before this, the number never exceed 10 guests in one time.
Am i missing something?

29 Apr 2010, 4:57 PM
#84
jamielife avatar

jamielife

Zen Follower

Join Date:
Dec 2009
Location:
Richmond, VA
Posts:
161
Plugin Contributions:
0

Re: AutoTweet [support]

Haha that's the beauty of twitter. I notice regular tweeting can make a huge impact on the number of visitors I receive a day. All this mod does is shorten and send a link to twitter... it doesnt have any affect on your online visitors counter. So I wouldnt call it a bug, more like the purpose of this mod.

2 May 2010, 8:20 PM
#85
ericvanwenkop avatar

ericvanwenkop

New Zenner

Join Date:
May 2010
Posts:
9
Plugin Contributions:
0

Re: AutoTweet [support]

I still got the problem with the products_name in my tweet....

The name of the product is not shown.

My tweet looks like this:
New Product available: "" Check it out at http://bit.ly/9mRfmk

I know i has been passed a few times in this topic, but i haven't seen any good explanations to fix it.

3 May 2010, 1:04 AM
#86
jamielife avatar

jamielife

Zen Follower

Join Date:
Dec 2009
Location:
Richmond, VA
Posts:
161
Plugin Contributions:
0

Re: AutoTweet [support]

try this:

Around line 19 of autoTweet.php (if you have the updated version of AutoTweet) find the line that looks like this:

$my_product_name = $_POST['products_name'][1]; 

and change it to:

$my_product_name = implode(" ", $_POST['products_name']); 

Try it again, let me know if that doesnt work.

4 May 2010, 10:39 PM
#87
ericvanwenkop avatar

ericvanwenkop

New Zenner

Join Date:
May 2010
Posts:
9
Plugin Contributions:
0

Re: AutoTweet [support]

jamielife:

try this:

Around line 19 of autoTweet.php (if you have the updated version of AutoTweet) find the line that looks like this:

$my_product_name = $_POST['products_name'][1];

> 
> and change it to:
> ```php
$my_product_name = implode(" ", $_POST['products_name']); 

Try it again, let me know if that doesnt work.

Thanks! it works for me

15 May 2010, 4:54 PM
#88
sunflowertami avatar

sunflowertami

Zen Follower

Join Date:
Jun 2008
Posts:
267
Plugin Contributions:
0

Re: AutoTweet [support]

"Zen Cart 1.3.9a Users: upload everything inside the admin folder to where ever your admin folder is on your server, and that's it... you're finished!" (v1.01)

For 1.3.9b:
This should be corrected to upload only "twitter" folder on admin. The update_product.php has somehow commented out line 198 (don't know if this is intentional) but it resulted in getting a screen of the category without the controls after one inserts a product.

see pic on this forum post:
http://www.zen-cart.com/forum/showthread.php?p=884412#post884412

22 May 2010, 3:34 AM
#89
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: AutoTweet [support]

sunflowertami:

"Zen Cart 1.3.9a Users: upload everything inside the admin folder to where ever your admin folder is on your server, and that's it... you're finished!" (v1.01)

For 1.3.9b:
This should be corrected to upload only "twitter" folder on admin. The update_product.php has somehow commented out line 198 (don't know if this is intentional) but it resulted in getting a screen of the category without the controls after one inserts a product.

see pic on this forum post:
http://www.zen-cart.com/forum/showthread.php?p=884412#post884412

For AutoTweet to work you still need this piece of code in admin/includes/modules/update_product.php after

$db->Execute("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . "
(products_id, categories_id)
values ('" . (int)$products_id . "', '" . (int)$current_category_id . "')");

(found around lines 82-84):

///////////////////////////////////////////////////////
//// INSERT PRODUCT-TYPE-SPECIFIC INSERTS HERE //////

  include_once("twitter/autoTweet.php");

  ////    *END OF PRODUCT-TYPE-SPECIFIC INSERTS* ////////
  ///////////////////////////////////////////////////////

Only uploading the admin/twitter folder may render the mod useless.

22 May 2010, 2:29 PM
#90
sunflowertami avatar

sunflowertami

Zen Follower

Join Date:
Jun 2008
Posts:
267
Plugin Contributions:
0

Re: AutoTweet [support]

That's right!

I should say just uncomment line 198 before uploading.

24 May 2010, 4:13 AM
#91
cavatappo avatar

cavatappo

New Zenner

Join Date:
May 2010
Location:
New York, NY
Posts:
10
Plugin Contributions:
0

Re: AutoTweet [support]

This has turned out to be a great mod. I was hesitant at first, as I would have liked what @sunflowertami was asking for as well. We have a restaurant, and there are several 'specials' we sometimes come back to due to popularity. Once we add a menu item, it would be great to go from RED to GREEN and have it tweet automatically without the extra step.

sunflowertami:

Hmm...well thanks for trying! I think I'll just use the original php file. It will still tweet the stuff on my temp category and people will click on it to get to my site however it will say product not found.

It was tweeting immediately after I added a new menu item, even if status was 'out of stock' (RED).
I found the culprit that was creating the tweet bug.

jamielife:

and replace just those 3 lines with:

} elseif ($action == 'update_product') {
zen_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_id . "'");
// bof Auto Tweet.
if($_POST['products_status'] = "1"){
include 'twitter/twitter.php';
require_once 'twitter/bitly.php';

// CHANGE: path to your store (i.e. http://example.com/store
$myStoreUrl = 'http://www.example.com';
// CHANGE: Your stores Twitter username and password
$twitter = new Twitter("TwitterUsername","TwitterPassword");
// CHANGE: Your bit.ly Username and API Key
// API Key should be a long number starting with "R_"
// available free @ http://bit.ly/account/your_api_key
$bitly = new Bitly('myBITLYusername', 'R_321321321321321');

// ##### No need to change below this line #####
// URL for bitly.php to shorten
$shirturl = $myStoreUrl . '/index.php?main_page=product_info&cPath=' . $current_category_id . '&products_id=' . $products_id ;
// send tweet.
$shirtname = $sql_data_array['products_name'];
$mytweet ='New Product Available: "' . $shirtname . '" Check it out at ' . $bitly->shorten($shirturl);
$twitter->updateStatus($mytweet);
}// eof Auto-Tweet
}


Follow @jamielife's directions above, but where...

```php
if($_POST['products_status'] = "1"){

change to...

if($_POST['products_status'] == 1){

This should do the trick. it would still be nice for the action to perform when turning RED to GREEN, but this should solve it tweeting when inactive. Great mod @jamielife!

4 Jun 2010, 3:57 PM
#92
dvdalt avatar

dvdalt

New Zenner

Join Date:
Dec 2009
Posts:
3
Plugin Contributions:
0

Re: AutoTweet [support]

I have installed the autotweet, but the file name update_product.php is the same file name for the autofacebook which i upload earlier, what can i do to fix this and have both working at the same time

4 Jun 2010, 4:13 PM
#93
dvdalt avatar

dvdalt

New Zenner

Join Date:
Dec 2009
Posts:
3
Plugin Contributions:
0

Re: AutoTweet [support]

I have installed the autotweet, but the file name update_product.php is the same file name for the autofacebook which i upload earlier, what can i do to fix this and have both working at the same time

8 Jun 2010, 1:37 PM
#94
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: AutoTweet [support]

can you tell me the code i need to copy from the twitter update_product.php and paste into the facebook auto update update_product.php

i have facebook already installed and running just want to add the twitter one also but the updateproduct will overwrite the facebook changes.

9 Jun 2010, 2:03 AM
#95
zozelli avatar

zozelli

New Zenner

Join Date:
May 2010
Posts:
6
Plugin Contributions:
0

Re: AutoTweet [support]

If Twitter goes down for any reason for instance, over capacity, the Twitter add on will cause an error on the cart website. Would it be possible to add an if-then-else type catch all to handle such a situation? New products cannot be entered while Twitter is down unless the code is commented out or some other workaround is used. The tweet goes out but the new product addition isn't realized and has to be reentered.

12 Jun 2010, 1:42 PM
#96
bakedblue avatar

bakedblue

New Zenner

Join Date:
Jun 2010
Location:
Essex, UK
Posts:
4
Plugin Contributions:
0

Re: AutoTweet [support]

I can't seem to get mine working. Could it be the new version of Zen Cart as I'm running v1.3.9d?

I have made the changes in the autoTweet.php file and uploaded all files to my server. When I create a new product nothing happens on Twitter.

Have you any ideas?

14 Jun 2010, 8:01 AM
#97
arjen avatar

arjen

New Zenner

Join Date:
Feb 2010
Posts:
10
Plugin Contributions:
0

Re: AutoTweet [support]

I'm Looking for a way to implement it with the multisite-mod.
I need to update multiple Twitter-accounts for each site in the multi-sitemod, only publishing the products available for the specific sites.
Not all categories are available on each site.

29 Jun 2010, 7:35 PM
#98
divaboutiques avatar

divaboutiques

Zen Follower

Join Date:
Feb 2007
Location:
Worldwide Web
Posts:
191
Plugin Contributions:
0

Re: AutoTweet [support]

I have installed this mod & it's working but it showing like this on twitter:

New Product Available: "" Check it out at http://bit.ly/aeG164

It's not showing the item title and when you click on the link it shows a 404 not found page. How can I correct this problem so that it can work properly?

29 Jun 2010, 8:01 PM
#99
divaboutiques avatar

divaboutiques

Zen Follower

Join Date:
Feb 2007
Location:
Worldwide Web
Posts:
191
Plugin Contributions:
0

Re: AutoTweet [support]

Nevermind I figured it out!

I had to change the following information

// CHANGE: path to your store (i.e. http://example.com/store
$myStoreUrl = 'http://divaboutiques.com';

To this:

// CHANGE: path to your store (i.e. http://example.com/store
$myStoreUrl = 'http://divaboutiques.com/store';

And everything is working fine now!

1 Jul 2010, 2:18 PM
#100
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: AutoTweet [support]

Thanks for the add on but you can do this an easier way without pulling out your hair. To submit to twitter every time you add a product is very simple. Just add this bit of code into your admin/includes/modules/update_product.php, just before the zen_redirect right at the end of the file, add the code below and don't forget to put in your user name and password thats it. No other files necessary.

// BOF twitter feed
if ($action == 'insert_product')
{
$purl = zen_catalog_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_id);
$tinyPurl = file_get_contents('http://tinyurl.com/api-create.php?url='.$purl);
function updateStatus($user, $password, $message)
{
$url = "http://twitter.com/statuses/update.xml";
$curl = curl_init($url);
$data = array('status'=>$message);
curl_setopt($curl, CURLOPT_USERPWD, $user.':'.$password);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_RETURNTRANSFER,1);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Expect:'));
$result = @curl_exec($curl);
curl_close($curl);
return $result;
}
$message = STORE_NAME . ' has a new product. ' . $tinyPurl;
$message = $_POST['products_name'][$_SESSION['languages_id']]. ' $' . $products_price . ' ' . $tinyPurl;
$user = 'YYYYYYYYY';
$password = 'XXXXXXXXX';
$result = updateStatus($user, $password, $message);
$messageStack->add_session($result, 'error');
}
// EOF twitter feed