Re: AutoFacebook [Support]
if you don't have a zip program, use something like 7zip or other free zip tools to compress the files into a zip and in the advanced reply you will see where you can upload files. Or you can try to upload them without zipping but I don't know if you can upload php files since it might be a security thing. It would clutter the thread to post the entire contents of all 3 files in a post and will make it easier to open them in my text editor to make the corrections. But if posting the files in the thread is the only option do it in 3 separate posts, one for each file.
Re: AutoFacebook [Support]
Hi Lankee,
Firstly ... MANY, MANY THANKS for your assistance !!!
Bravo - it works and works extremely well !! - just the answer I was looking for and I am sure other users are looking for. This is now an excellent and useful tool.
In my humble opinion I think either yourself or DivaVocals (or some moderator) should adopt your changes into the plugin as it now stands given that it is not being supported so that everyone can enjoy this plugin. A few lines of code change and a few notes in the readme and I believe then that this plugin will be very, very useful for many Zenners. I will now adapt it to all 10 of my sites as I develop Facebook pages for them.
Again mate, well done!!
cheers,
Mike
p.s. my error was in the second set of this group - (I have no idea why it is repeated_ - I left it blank but somehow I must have deleted the } directly after it - after finding that error by comparing modified file to original file it now works. I am still getting that bit of code on the confirmation / insert page so when I can figure out how to get a copy of my modified .php files to you maybe then you might spot what I missed (advanced won't accept.7zip files ??)
///////////////////////////////////////////////////////
//// INSERT PRODUCT-TYPE-SPECIFIC *UPDATES* HERE //////
//// *END OF PRODUCT-TYPE-SPECIFIC UPDATES* ////////
///////////////////////////////////////////////////////
}
Re: AutoFacebook [Support]
I'm glad to hear that you got it working correctly now. I don't know why it's still showing a bit of misplaced code but something went a little wrong.
You should be pasting all of the facebook code from the insert section, including the little snippets I posted, inside of this "updates" section like this
Code:
///////////////////////////////////////////////////////
//// INSERT PRODUCT-TYPE-SPECIFIC *UPDATES* HERE //////
insert the facebook code from "insert" section here including my code
//// *END OF PRODUCT-TYPE-SPECIFIC UPDATES* ////////
///////////////////////////////////////////////////////
Now, if you want, you can also (or instead of for existing products before this mod was added) add to facebook when updating the product as well as when adding it. This might correct the problem of the misplaced code showing up in the preview page. I agree that the code should be added, I offered to do it before a couple years back in this thread but not a single person replied about it so I didn't want to waste my time on something that might not be used or wanted by the masses which is the case for most of my work.
If you can't find out how to get rid of the extra bit that's showing up on the preview page, post the code. When you are zipping the files in 7zip you need to change the extension to .zip (save as a .zip and not .7zip) and then you can upload it here. I will have a look and correct the problem and let you know what needs to be done. Obviously, I didn't do a very good job of explaining all of the steps for which I apologize. I know it's frustrating to spend time figuring out niggling little things when there are better things to do so I need to see what went wrong to help others avoid it.
Re: AutoFacebook [Support]
edit timed out again...
There are 2 separate sections, one that says
Code:
///////////////////////////////////////////////////////
//// INSERT PRODUCT-TYPE-SPECIFIC *INSERTS* HERE //////
//// *END OF PRODUCT-TYPE-SPECIFIC INSERTS* ////////
///////////////////////////////////////////////////////
and one that says
Code:
///////////////////////////////////////////////////////
//// INSERT PRODUCT-TYPE-SPECIFIC *UPDATES* HERE //////
//// *END OF PRODUCT-TYPE-SPECIFIC UPDATES* ////////
///////////////////////////////////////////////////////
The first is for when you are first creating, or inserting, a product and the second is for when you are changing or updating a product. Both should really have identical copies of the facebook code plus my little snippets. This may or may not correct your problem if there is a bit of errant code in there somewhere. But, you should put the code in both to make this the most flexible.
Just remember, tell your customers that if they have already added a product to fb and they go back to change something they should change the add to facebook radio button to "no" so the product won't get added a second time unless they want it to.
Re: AutoFacebook [Support]
thanks for the rename .zip hint - Attachment 12773Attachment 12774Attachment 12775 hopefully the files have uploaded correctly.
I will make a recommendation to those in the know about getting this modification adapted - I think SWGUY is a moderator - this is a fantastic marketing tool now and I don't know why every Zenner wouldn't use it if they also have a Facebook page or store at least now with this great function. The readme needs work for people without a lot of IT knowledge to be able to install it more easily, it confused many including me (I think a lot of people gave up due to this aspect and lack of support)
cheers,
Mike
you will note there are two of these in the file update_product.php - I figure one is an errant duplication??
///////////////////////////////////////////////////////
//// INSERT PRODUCT-TYPE-SPECIFIC *UPDATES* HERE //////
//// *END OF PRODUCT-TYPE-SPECIFIC UPDATES* ////////
///////////////////////////////////////////////////////
Re: AutoFacebook [Support]
isn't it amazing how the brain will read what it wants to and not what it sees :smile:
I will put the code in the other one now and see if that gets the code to disappear from the page.- it begs the question though if the code was only originally in the 'insert' section as to why it was uploading all 'updates' as well? Anyway - fixed now, right.
I am my own customer and I have no doubt that I will forget to change the radio button for a while until I get used to it - old habits die hard.
cheers,
Mike
Re: AutoFacebook [Support]
Line 97 to 100 of preview_info. Just delete those lines
PHP Code:
}
?>
</td>
</tr>
None of that should be there.
You also had an error with the closing } of my snippet in the facebook code blocks in update_products. You put them in too soon, they should have been at the bottom of the entire facebook code block which ends right above
//// *END OF PRODUCT-TYPE-SPECIFIC UPDATES* //////// ///////////////////////////////////////////////////////
and
//// *END OF PRODUCT-TYPE-SPECIFIC INSERTS* //////// ///////////////////////////////////////////////////////
I have edited the files in the attachment, just upload them and you should be good. Please let me know if you have any other issues.
Edit: I will be the first to admit I don't know everything about zen cart code, I thought the "insert" section was for when products are being added and the "updates" was for when they are being modified. I could very easily be wrong and it would be far from the first time (or the last).:laugh:
Re: AutoFacebook [Support]
Quote:
Originally Posted by
lankeeyankee
Line 97 to 100 of preview_info. Just delete those lines
PHP Code:
}
?>
</td>
</tr>
None of that should be there.
You also had an error with the closing } of my snippet in the facebook code blocks in update_products. You put them in too soon, they should have been at the bottom of the entire facebook code block which ends right above
//// *END OF PRODUCT-TYPE-SPECIFIC UPDATES* //////// ///////////////////////////////////////////////////////
and
//// *END OF PRODUCT-TYPE-SPECIFIC INSERTS* //////// ///////////////////////////////////////////////////////
I have edited the files in the attachment, just upload them and you should be good. Please let me know if you have any other issues.
Edit: I will be the first to admit I don't know everything about zen cart code, I thought the "insert" section was for when products are being added and the "updates" was for when they are being modified. I could very easily be wrong and it would be far from the first time (or the last).:laugh:
Thanks Lankee,
deleting that code got rid of the errant code on the preview page - thanks.
Using your corrected update_product.php file caused the same error it did for me when I entered code in the update section - it causes a blank page after hitting update, goes nowhere and using back button then requires a browser 'resend'. Even deleting that } after the updates section does the same so there is something else awry here.
So I deleted all code from the updates section and re-inserted the } below it so now it updates Facebook ok for 'new products' (but understandably not for updates of product.) ??
cheers,
Mike
Re: AutoFacebook [Support]
I just looked again and noticed you must have deleted a } at the end of the "updates" section. I have corrected it and posted the new code here.
Re: AutoFacebook [Support]
Quote:
Originally Posted by
lankeeyankee
I just looked again and noticed you must have deleted a } at the end of the "updates" section. I have corrected it and posted the new code here.
Hi Lankee,
Alas when I use your new modified update_product file nothing updates .. ?? So I have reverted to the file I originally sent you. It updates Facebook with new product via 'inserts' but not updates.
I will continue to play with the code over the next couple of days to see if I can get it to work on 'updates' as I agree that this would be a great advantage (being able to rotate products onto FB when required).
cheers,
Mike