Results 1 to 10 of 695

Hybrid View

  1. #1
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    113
    Plugin Contributions
    1

    Default Re: AutoFacebook [Support]



    Got it, SO ******* happy with myself right now.

    I've worked out how to format php output from zen cart to facebook and twitter.

    Look for this line:
    Code:
    $price = $products_price;
    and edit to this:
    Code:
    	$vat = .20;
    	$price = (number_format(( $products_price + $products_price * $vat), 2, '.', ''));
    that sorts facebook.

    if your using Autotweet as well

    look for this line:
    Code:
    if ($showprice){ $message .=  ' Only $' . $products_price . '.'; }
    and edit to this:
    Code:
    if ($showprice){ $message .= ' Only £' . number_format(( $products_price + $products_price * $vat), 2, '.', '') . ' !'; }
    That only tookm me two days, bring on the hard stuff.

  2. #2
    Join Date
    Sep 2010
    Posts
    24
    Plugin Contributions
    0

    Default Re: AutoFacebook [Support]

    Everything was working till today. I try to get new token but I get this code. Try every sugestion from thread for this error but no luck. Any help, thanx.

    Code:
    Notice: Undefined offset: 1 in /htdocs/facebook_authorization.php on line 956
    
    Fatal error: Uncaught CurlException: 28: connect() timed out! thrown in /htdocs/facebook_authorization.php on line 599

  3. #3
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    113
    Plugin Contributions
    1

    Default Re: AutoFacebook [Support]

    Would like some (probably advanced) help on this one .
    Would really like to have correct price showing on the facebook updates (where price does not include VAT).

    My previous attempt to fix this works okay if and when the price does include VAT. see two posts up.

    Have been looking through other mods I have implemented and found this calc for colloecting Info on price it's form /admin/includes/modules/product/collect_info.php

    Code:
    <script language="javascript" type="text/javascript"><!--
    var tax_rates = new Array();
    <?php
        for ($i=0, $n=sizeof($tax_class_array); $i<$n; $i++) {
          if ($tax_class_array[$i]['id'] > 0) {
            echo 'tax_rates["' . $tax_class_array[$i]['id'] . '"] = ' . zen_get_tax_rate_value($tax_class_array[$i]['id']) . ';' . "\n";
          }
        }
    ?>
    
    function doRound(x, places) {
      return Math.round(x * Math.pow(10, places)) / Math.pow(10, places);
    }
    
    function getTaxRate() {
      var selected_value = document.forms["new_product"].products_tax_class_id.selectedIndex;
      var parameterVal = document.forms["new_product"].products_tax_class_id[selected_value].value;
    
      if ( (parameterVal > 0) && (tax_rates[parameterVal] > 0) ) {
        return tax_rates[parameterVal];
      } else {
        return 0;
      }
    }
    
    function updateGross() {
      var taxRate = getTaxRate();
      var grossValue = document.forms["new_product"].products_price.value;
    
      if (taxRate > 0) {
        grossValue = grossValue * ((taxRate / 100) + 1);
      }
    
      document.forms["new_product"].products_price_gross.value = doRound(grossValue, 4);
    }
    
    function updateNet() {
      var taxRate = getTaxRate();
      var netValue = document.forms["new_product"].products_price_gross.value;
    
      if (taxRate > 0) {
        netValue = netValue / ((taxRate / 100) + 1);
      }
    
      document.forms["new_product"].products_price.value = doRound(netValue, 4);
    }
    //--></script>
    It would I think (truth is I don't really know a lot about coding) solve the issue of tax/vat showing or not showing as required.

    Are there any proper coders reading this thread any more?
    Is there a way to transfer tis to the Autofacebook module?
    Would it need converted into a php function and can someone do this?
    Am I asking to much?
    Please Jamie I need your input.

  4. #4
    Join Date
    Mar 2011
    Posts
    364
    Plugin Contributions
    0

    Default Re: AutoFacebook [Support]

    Is there a way we can update the instructions since it looks like the apps for facebook has changed?

    I got it to work and it says facebook updated successfully on my admin side but when i go to my facebook page it is blank.

    i have the correct ID's and such that are correctly filled in.

  5. #5
    Join Date
    Sep 2011
    Location
    Sydney, Australia
    Posts
    48
    Plugin Contributions
    0

    Default Re: AutoFacebook [Support]

    is anyone here having issues with their autofacebook lite? it worked for me until days ago and nothing has changed except i think, a newer fb layout??

  6. #6
    Join Date
    Feb 2007
    Posts
    1,704
    Plugin Contributions
    0

    Default Re: AutoFacebook [Support]

    im having trouble installing this as facebook developers screen have changed andf all the button are now different. Can some create new installation instructions please.

    stuck on step 4

    4. For now we need to click "Web Site" on the left (not that i can see) and edit our "Site URL" and our "Site Domain".
    The Site URL is simply your store's web address followed by a '/' forward slash. So it should look something like "http://mystore.com/"
    Your Site Domain is just your domain name 'dot' whatever and could look like "mystore.com". No "http://", no "www.", and no "/"

    5. Now click "Facebook Integration" on the left (i cant see this either). Towards the bottom you should see "Installable to?" (or this). Uncheck "Users"(or this) and add a check next to "Facebook Pages"(or this) instead.

  7. #7
    Join Date
    Sep 2011
    Location
    Sydney, Australia
    Posts
    48
    Plugin Contributions
    0

    Default Re: AutoFacebook [Support]

    Hey, I just filled out what I can and FINALLY got Autofacebook 2.0 to work without any problems. Those other things you have to look for, I couldnt find and doesnt seem to exist.


    Quote Originally Posted by kitcorsa View Post
    im having trouble installing this as facebook developers screen have changed andf all the button are now different. Can some create new installation instructions please.

    stuck on step 4

    4. For now we need to click "Web Site" on the left (not that i can see) and edit our "Site URL" and our "Site Domain".
    The Site URL is simply your store's web address followed by a '/' forward slash. So it should look something like "http://mystore.com/"
    Your Site Domain is just your domain name 'dot' whatever and could look like "mystore.com". No "http://", no "www.", and no "/"

    5. Now click "Facebook Integration" on the left (i cant see this either). Towards the bottom you should see "Installable to?" (or this). Uncheck "Users"(or this) and add a check next to "Facebook Pages"(or this) instead.

  8. #8
    Join Date
    Jul 2008
    Location
    Bristol, England
    Posts
    17
    Plugin Contributions
    1

    Default Re: AutoFacebook [Support]

    Quote Originally Posted by vescera View Post
    Everything was working till today. I try to get new token but I get this code. Try every sugestion from thread for this error but no luck. Any help, thanx.

    Code:
    Notice: Undefined offset: 1 in /htdocs/facebook_authorization.php on line 956
    
    Fatal error: Uncaught CurlException: 28: connect() timed out! thrown in /htdocs/facebook_authorization.php on line 599
    Hi,

    I decided to use the built in Zen Cart function for displaying the price:

    $price = zen_get_products_display_price((int)$products_id);

    Hope this helps.

  9. #9
    Join Date
    Apr 2007
    Posts
    30
    Plugin Contributions
    0

    Default Re: AutoFacebook [Support]

    Quote Originally Posted by BillyBoyle View Post


    Got it, SO ******* happy with myself right now.

    I've worked out how to format php output from zen cart to facebook and twitter.

    Look for this line:
    Code:
    $price = $products_price;
    and edit to this:
    Code:
        $vat = .20;
        $price = (number_format(( $products_price + $products_price * $vat), 2, '.', ''));
    that sorts facebook.

    if your using Autotweet as well

    look for this line:
    Code:
    if ($showprice){ $message .=  ' Only $' . $products_price . '.'; }
    and edit to this:
    Code:
    if ($showprice){ $message .= ' Only &pound;' . number_format(( $products_price + $products_price * $vat), 2, '.', '') . ' !'; }
    That only tookm me two days, bring on the hard stuff.

    what file is this? which file do I need to edit?

  10. #10
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    113
    Plugin Contributions
    1

    Default Re: AutoFacebook [Support]

    Quote Originally Posted by armie View Post
    what file is this? which file do I need to edit?
    First the easy question:
    The price you are seeing is the price without TAX or VAT or whatever added.

    The mod to the file corrects that. so that if you live in a country where we are not used to seeing TAX added at the sale end you don't give miss-leading prices to customers.

    Sorry willie bee it has nothing to do with sales.

    This would be edits to the file whatever-admin/includes/modules/update_product.php.

    You would be looking for the section that starts


    //// INSERT PRODUCT-TYPE-SPECIFIC *UPDATES* HERE //////
    ///////////////////////////////////////////////////////
    //AutoFacebook

    in this section look below your:
    $app_id = "8888888888888"; //given when you created app
    $app_secret = "a5a5a5a5a5a5a5a5a5a5a5a5a5a"; //given when you created app
    $page_id = "1234567890987654321"; //obtained from running facebook_authorization.php from your browser
    $page_token = "blahblahblahblah"; //long number obtained from facebook_authorization.php
    $store_name = "AML Candles"; // store name i.e. "Mary's Car Shop", or "MikesCupcakes.com."
    $store_url = 'http://amlcandles.co.uk'; //path to your store without the trailing "/"
    $cur = '&pound;'; //change to your currency symbol. Assumes symbol comes in front of numbers
    $new_message = "Scented Soy Wax Candles!"; // change to whatever or leave the same. i.e "New Cupcake!"

    There is a line that says (ironically)
    // No Need to edit below here.
    about line number 116: (in my version anyway)

    below that you'll see

    About line 123: $price = $products_price; //this is what you need to edit first

    Add the lines of code you seen in the other post and that sorts the VAT issue for both Auto-Facebook and Auto-Tweet.

    If you need to clean up your postings to get rid of the html from your product descriptions you need to edit the line.

    around line 119:

    There were a few optional line commented out there so just pick the one that looks similar to:

    $products_description = strip_tags($products_description);

    That cleans things up if you haven't done so already.


 

 

Similar Threads

  1. v151 autofacebook help
    By sean g in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 27 Nov 2014, 08:52 PM
  2. AutoFacebook and Canada Post Modules
    By DJLQD in forum General Questions
    Replies: 0
    Last Post: 27 Feb 2013, 02:32 PM
  3. v139h Help please with Autofacebook - Support thread is no longer supported
    By shags38 in forum General Questions
    Replies: 0
    Last Post: 18 Jul 2012, 01:49 PM
  4. Problems with AutoFacebook
    By amanda099 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 31 Aug 2010, 10:12 AM
  5. AutoFacebook OG 1.3.9 addon problems
    By eOstrE in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 7 Jul 2010, 09:44 AM

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