Thread: Twitter Tweets

Page 6 of 6 FirstFirst ... 456
Results 51 to 60 of 60
  1. #51
    Join Date
    Jul 2007
    Posts
    2,169
    Plugin Contributions
    16

    Default Re: Twitter Tweets

    Quote Originally Posted by limelites View Post
    /includes/modules/update_product.php

    round(zen_get_products_special_price($products_id, false), 2)
    Thanks for the update
    Is your site Upgraded to the current version 1.5.4 Yet?
    zencart-upgrades-website-installation

  2. #52
    Join Date
    Jun 2003
    Location
    Newcastle UK
    Posts
    2,930
    Plugin Contributions
    4

    Default Re: Twitter Tweets

    Quote Originally Posted by mipavluk View Post
    Wilt, could you please, put all this improves:

    $_POST['products_name'][$_SESSION['languages_id']]

    $display_special_price = zen_get_products_special_price($products_id, true)

    round(zen_get_products_special_price($products_id, false), 2)

    like must be in the message row please?

    I try in this way:

    Code:
    $message = STORE_NAME . ' has a new product. ' . $_POST['products_name'][$_SESSION['languages_id']] . round(zen_get_products_special_price($products_id, false), 2) . $tinyPurl;
    without success...

    Hi,

    need some more information. When you say without success, do you mean no message is sent to twitter.

    Are you including this in the product update code, as shown in previous posts.

    Can you get any message to send to twitter.
    ie if you just set

    $message = 'This is a test";

  3. #53
    Join Date
    Jun 2003
    Location
    Newcastle UK
    Posts
    2,930
    Plugin Contributions
    4

    Default Re: Twitter Tweets

    also I have been informed that some people have problems calling twitter using an https domain and that setting

    $url = "http://twitter.com/statuses/update.xml";

    in the updateStatus function, works better.

  4. #54
    Join Date
    Jun 2007
    Location
    Posadas, Misiones, Argentina
    Posts
    220
    Plugin Contributions
    0

    Default Re: Twitter Tweets

    I finally solved... was my syntaxis I think... the code works exactly like you provide...

    thanks...
    URL: http://www.littledreamswarehouse.com/shop
    Zen Version: 1.3.89h
    Zen Template: orange modified

  5. #55
    Join Date
    Oct 2009
    Posts
    7
    Plugin Contributions
    0

    Default Re: Twitter Tweets

    I have not been able, what is the final text :?

  6. #56
    Join Date
    Jun 2007
    Location
    Posadas, Misiones, Argentina
    Posts
    220
    Plugin Contributions
    0

    Default Re: Twitter Tweets

    Code:
    // 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 = "https://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;
          $user = 'YYYYYYYYY';
          $password = 'XXXXXXXXX';
          $result = updateStatus($user, $password, $message);
          $messageStack->add_session($result, 'error');
        }
        // EOF twitter feed
    YYYYYYY: your username
    XXXXXX: your password

    I try with price and product name, but like in my store, product name is so large, I decide go with wilt text
    URL: http://www.littledreamswarehouse.com/shop
    Zen Version: 1.3.89h
    Zen Template: orange modified

  7. #57
    Join Date
    Jun 2009
    Posts
    389
    Plugin Contributions
    0

    Default Re: Twitter Tweets

    Hi, I have been able to successfully use this great Tweet but I have to make 2 separate mods if I put my item on sale.

    For example, if I have an item listed for $12 but put it on sale for $7 then it tweets $12 so then I have to go in and hard code to $display_special_price SO my question is.....

    Is it possible that it picks the current price whether it is a sale or not?

    Thanks Wilt & everyone for all the help.

  8. #58
    Join Date
    Jun 2007
    Location
    Posadas, Misiones, Argentina
    Posts
    220
    Plugin Contributions
    0

    Default Re: Twitter Tweets

    Wilt

    I install the mod for another zen... and does not work...
    the same like countrycharm here:
    http://www.zen-cart.com/forum/showpo...3&postcount=36

    I get the error area, without text and no post in twitter

    I check with the hosting about the PHP Curl extensions and they said are available in my hosting account

    I will pm you my code...

    thanks in advance...
    URL: http://www.littledreamswarehouse.com/shop
    Zen Version: 1.3.89h
    Zen Template: orange modified

  9. #59
    Join Date
    Jul 2007
    Posts
    2,169
    Plugin Contributions
    16

    Default Re: Twitter Tweets

    Quote Originally Posted by mipavluk View Post
    Wilt

    I install the mod for another zen... and does not work...
    the same like countrycharm here:
    http://www.zen-cart.com/forum/showpo...3&postcount=36

    I get the error area, without text and no post in twitter

    I check with the hosting about the PHP Curl extensions and they said are available in my hosting account

    I will pm you my code...

    thanks in advance...
    Hi does the code look like this with the highlighted area in red?
    // 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 = "https://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;
    $user = 'YYYYYYYYY';
    $password = 'XXXXXXXXX';
    $result = updateStatus($user, $password, $message);
    $messageStack->add_session($result, 'error');
    }
    // EOF twitter feed
    If it does try changing the https:// to just http:// and see if that want take care of your problem.
    Is your site Upgraded to the current version 1.5.4 Yet?
    zencart-upgrades-website-installation

  10. #60
    Join Date
    Jun 2007
    Location
    Posadas, Misiones, Argentina
    Posts
    220
    Plugin Contributions
    0

    Default Re: Twitter Tweets

    yessssssssssssssss!
    thank you very much!!!!!!!!
    URL: http://www.littledreamswarehouse.com/shop
    Zen Version: 1.3.89h
    Zen Template: orange modified

 

 
Page 6 of 6 FirstFirst ... 456

Similar Threads

  1. v151 Twitter Feed
    By DigiBooks in forum General Questions
    Replies: 1
    Last Post: 6 May 2015, 02:03 AM
  2. Twitter sidebox
    By karenkte in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 29 Apr 2015, 05:25 PM
  3. v151 Twitter - Tweets not showing
    By karenkte in forum General Questions
    Replies: 1
    Last Post: 8 Mar 2013, 11:49 AM
  4. Twitter
    By irishshopper in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 11 Jul 2010, 01:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg