Thread: Twitter Tweets

Page 1 of 2 12 LastLast
Results 1 to 10 of 60

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Twitter Tweets

    OK, so I've answered my own question. I just replaced if ($action == 'insert_product') with if ($action == 'update_product') and it's now adding everything to Twitter when I am in fact just duplicating existing ads to use as templates. When I finally click "Update" then it adds to Twitter.

    Wonderful!!

    I read the post above about Shareaholic and I've installed the FF Addon too. It will come in handy if I decide to ever use those other networks.... Do you recommend any in particular? Twine?? I've never even heard of Twine but is it worth the time and effort having your products listed there?

    Also, could I ask you to help with one more thing? Instead of the Twitter feed saying $message = STORE_NAME . ' has a new product. ' . $tinyPurl; would there be a way to make it display the product_id and the product_price and then the tiny URL? ?
    Last edited by limelites; 23 Jun 2009 at 05:32 PM.

  2. #2
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Twitter Tweets

    OK guys, someone please help me out here as I've been struggling with this code for ages now. I'm trying to have the code upload to Twitter, but instead of the STORE_NAME and standard message, I want it to post the products name followed by the products_price and finally the tiny url....

    The Code I'm using is working for the price and the tiny url but I cannot for the life of me get the products name to display... what $ must I use for it to display the products name because $products_name just will not work!! I've also tried $productname and $ProductName but just cannot get it to display...

    $message = $products_name . ' £' . $products_price . ' ' . $tinyPurl;

    Can anyone help please??

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

    Default Re: Twitter Tweets

    The problem with the product name is that it is language dependant. So there is no simple variable holding it.

    However you can access the name in the default language using

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

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

    Default Re: Twitter Tweets

    Just a note as well. There is an API to use bit.ly, although it takes a bit more work than tinyUrl as it requires authentication.

  5. #5
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Twitter Tweets

    Wilt, thank you!! That worked an absolute treat :-)

  6. #6
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Twitter Tweets

    Hi All,

    Back to the drawing board with this, it's working but now I want the product special price sent to twitter... what would I use instead of $products_price to display $products_special_price?

  7. #7
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Twitter Tweets

    OK, answered my own question again:

    $display_special_price = zen_get_products_special_price($products_id, true)


    But how do you get the price to display to two places after the decimal point? At present, it's displaying £49.9900 instead of £49.99

  8. #8
    Join Date
    Jan 2008
    Posts
    90
    Plugin Contributions
    0

    Default Re: Twitter Tweets

    Quote Originally Posted by limelites View Post
    I read the post above about Shareaholic and I've installed the FF Addon too. It will come in handy if I decide to ever use those other networks.... Do you recommend any in particular? Twine?? I've never even heard of Twine but is it worth the time and effort having your products listed there?
    I get a good share of my visitors from Kaboodle and Twine believe it or not.

    Also...the other poster mentioned needing an API for Bit.ly....I never set one up and it works fine for me.

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

    Default Re: Twitter Tweets

    Shareaholic uses its own bit.ly account/api key behind the scenes.

    If you want custom tracking of bit.ly links then you can set it to use your own personal bit.ly account.

    If you want to use the bit.ly api programtically, you will need a bit.ly account/api key.

    HTH

  10. #10
    Join Date
    Mar 2007
    Posts
    31
    Plugin Contributions
    0

    Default Re: Twitter Tweets

    This seems great. Is there someone that can post a wrapup version of this code and what to change. I really want to do the same thing on my shop!

 

 
Page 1 of 2 12 LastLast

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