Results 1 to 20 of 20
  1. #1
    Visual Artist & ABW Ambassador lostdeviant's Avatar
    Join Date
    September 7th, 2007
    Location
    Cuautitlán, Edo. de México
    Posts
    1,725
    Popshops Wordpress plugin and PHP
    Hi,

    I found that using pop shops saved me a lot of time. I was able to make 30 posts of products in the time it would have normally taken me to post 10, so I of course signed up for the 'pro' version after around the 5th 'shop' so I could use PHP for search engines since search engines don't scan Javascript.

    I was able to add the PHP to my posts by adding them to the code view and saving after enabling a PHP plugin for wordpress.

    Is it possible for the Wordpress plugin give the option to insert the PHP to the end of an existing post (if someone is using Pro or Enterprise versions)?

  2. #2
    Full Member JessieJ's Avatar
    Join Date
    July 13th, 2006
    Location
    Seattle, WA
    Posts
    426
    Post popper and after-post plugin
    There is a way to create a shop after a post and I've created an embarrassingly rough screencast to show you how to do it.

    Caveat: The shop's AutoFeed is not behaving correctly when published. That issue is being addressed.

    JessieJ
    (Listen carefully and you can hear my dog Pedro give ABW a shout-out bark in the background.)

  3. #3
    Lite On The Do, Heavy On The Nuts Donuts's Avatar
    Join Date
    January 18th, 2005
    Location
    Winter Park, FL
    Posts
    6,930
    J, rough? Really? I thought it was a pretty cool screencast.
    Thanks.
    Tell Pedro I said woof back.

  4. #4
    Visual Artist & ABW Ambassador lostdeviant's Avatar
    Join Date
    September 7th, 2007
    Location
    Cuautitlán, Edo. de México
    Posts
    1,725
    Hi, I like your presentation. I think it was actually good however when I followed what you did and checked the source code from the webbrowser all I see is JAVASCRIPT for the shop not PHP.
    Javascript shops won't get in the search engines.

    Is there a way to do the same steps but have it use PHP instead of Javascript?

    I'm using a plugin for allowing PHP code to run I just need that code inserted.
    Last edited by lostdeviant; November 14th, 2007 at 04:29 PM. Reason: more info

  5. #5
    Full Member JessieJ's Avatar
    Join Date
    July 13th, 2006
    Location
    Seattle, WA
    Posts
    426
    Lostdeviant,
    Ah, that should not be happening. I will check into that as well.

    JessieJ

  6. #6
    Visual Artist & ABW Ambassador lostdeviant's Avatar
    Join Date
    September 7th, 2007
    Location
    Cuautitlán, Edo. de México
    Posts
    1,725
    I got sick of copy/paste the PHP code so I hacked the popshops.php file to force it to use PHP code.

  7. #7
    ABW Ambassador writerguy's Avatar
    Join Date
    January 17th, 2005
    Location
    Springfield, Missouri, USA
    Posts
    3,248
    Okay, now you've got me interested. I have used a couple of scripts which specifically create WordPress posts from datafeeds, but I've not yet tried the popshops plugin. Gotta get to that in the next day or two.

    Thanks so much for your video tutorial. I'm with Donuts -- I thought it was very well done.

    BTW -- I have NEVER made a single sale from the datafeeds-to-WP scripts, though I have posted literally hundreds, maybe thousands, of product datafeeds over time into WordPress blogs. I remain captivated by the idea in principle, but I have yet to see it work in reality.

    Has anyone had sales using the popshops WP plugin? I don't mean using it for a widget in the sidebar, but using it in the body of a page/post in WordPress?
    Generate more fake news.

  8. #8
    Newbie
    Join Date
    January 21st, 2006
    Location
    Central Ohio
    Posts
    32
    Thanks for the idea of hacking the script to use the php instead of javascript deviant.. I did the same thing you did, went and upgraded after hitting my 10 shop limit with the plans of using php instead of JS. It would be nice if when the plugin logs the user in to validate and get the API key, it would check for account level and provide additional options based on account type - like display shops using PHP for pro+ users.

    *wanders off to hack the script to use PHP instead of JS*

    EDIT: It looks like this functionality was added. When I looked at the render_shop function the if and elseif are both testing for the same thing.. It is doing if($has_php == 'true') use javascript elseif($has_php == 'true') use the curl stuff.. I just changed the if($has_php == 'true') to if($has_php != 'true') and it works like a charm!
    Last edited by Shawn Ingram; January 8th, 2008 at 04:00 PM.

  9. #9
    Visual Artist & ABW Ambassador lostdeviant's Avatar
    Join Date
    September 7th, 2007
    Location
    Cuautitlán, Edo. de México
    Posts
    1,725
    Shawn,
    It is a really easy hack. There is a place in the script that is obviously supposed to check to see if php will work for the account and do one or the other.
    Just make both options do the php shop. (replace the code that installs the Javascript shop with the php shop code)

  10. #10
    Newbie
    Join Date
    January 21st, 2006
    Location
    Central Ohio
    Posts
    32
    Actually it was easier than that.. The problem was a logic coding error where both logic statements in the if structure was testing for the same result. Changing the initial if statement to $has_php != 'true' did the trick. Before it was never hitting the elseif because $has_php was true and it executed the javascript and then skipped the elseif to finish the function.

  11. #11
    Visual Artist & ABW Ambassador lostdeviant's Avatar
    Join Date
    September 7th, 2007
    Location
    Cuautitlán, Edo. de México
    Posts
    1,725
    I used the brute force method, so I wouldn't have to analyze the code .... If the coding error is so simple, I wonder why Jessie and team never got around to fixing it!

  12. #12
    Member
    Join Date
    January 2nd, 2008
    Posts
    72
    I fixed the bug in the plugin so it will now check whether or not you are allowed php correctly when appending shops to the end of a page or post. Yes, it was a stupid mistake on my part. The file is also now slightly optimized to check the php status once, instead of for every shop, in a single request. If you have a lot of shops on one page this will definitely help.

    You can get the new zip at http://www.popshops.com/faq/wordpress. You only really need to replace the 'popshops.php' file.

  13. #13
    Member
    Join Date
    January 2nd, 2008
    Posts
    72
    Hey lostdeviant,

    Yes, I should have gotten it fixed sooner. We are trying to get a lot of new features wrapped up and out the door and juggling everything at once is a lot of fun, but sometimes things slip through the cracks. Let me know if you run into any more problems.

  14. #14
    Newbie
    Join Date
    January 21st, 2006
    Location
    Central Ohio
    Posts
    32
    Not sure.. I just sent an email to support with the fix.. I uploaded it to one of my wordpress sites and looked at the page source and it definitely works after changing the first logic statement. All the code on the pages are php with product description text and all. Sometimes it just takes fresh eyes not so closely tied to a project to find the little obscure stuff I guess.. heh

    EDIT: Sorry Dan.. I was typing this out and got distracted and didn't catch your posts before submitting. And no worries about the error, these things happen and with so many things going on can be hard to catch in testing.. Especially something so obscure.. Keep up the awesome work!

  15. #15
    Visual Artist & ABW Ambassador lostdeviant's Avatar
    Join Date
    September 7th, 2007
    Location
    Cuautitlán, Edo. de México
    Posts
    1,725
    Quote Originally Posted by danharms
    Hey lostdeviant,

    Yes, I should have gotten it fixed sooner. We are trying to get a lot of new features wrapped up and out the door and juggling everything at once is a lot of fun, but sometimes things slip through the cracks. Let me know if you run into any more problems.
    Well, I have been using my hacked version. I would appreciate it if you'd take a look at my thread regarding making the autofeed feature somewhat relevant. I really consider that to be urgent.

    I wonder if the Popshops plugin could actually make the shop truly part of the content instead of below it.
    I've been experimenting with BBPress, the forum software from the makers of Wordpress. There is a plugin for it that allows blog posts to be sent on to the forum as a new thread. Of course, the PopShops shop doesn't get sent over. (I wouldn't expect it to either).

  16. #16
    Member
    Join Date
    January 2nd, 2008
    Posts
    72
    We have been looking at different ways of exposing the rules that comprise how the autofeed is defined so you would be able to fine tune the products that are appearing. Right now the autofeed is designed to err on the side of bringing in a broad range of products, as opposed to a selected few. We are working on giving you control over that balance.

    About getting a shop to be in the actual post...The problem is really how WordPress handles php pasted inside of the post/page. Right now it requires another plugin to get custom php inside of a post to be parsed, which some people are using to manually paste shops into a post. There might be a way to get the plugin to bypass that, but I'll need to take a look.

  17. #17
    ABW Ambassador IOWNIE's Avatar
    Join Date
    March 23rd, 2006
    Location
    Katy, Texas
    Posts
    634
    Can anyone tell me which one is which? Should I download JING or SCREENCAST if I want to try and make a screen shot come to life like that REALLY COOL thing I just looked at

  18. #18
    Visual Artist & ABW Ambassador lostdeviant's Avatar
    Join Date
    September 7th, 2007
    Location
    Cuautitlán, Edo. de México
    Posts
    1,725
    Quote Originally Posted by danharms
    We have been looking at different ways of exposing the rules that comprise how the autofeed is defined so you would be able to fine tune the products that are appearing. Right now the autofeed is designed to err on the side of bringing in a broad range of products, as opposed to a selected few. We are working on giving you control over that balance.

    About getting a shop to be in the actual post...The problem is really how WordPress handles php pasted inside of the post/page. Right now it requires another plugin to get custom php inside of a post to be parsed, which some people are using to manually paste shops into a post. There might be a way to get the plugin to bypass that, but I'll need to take a look.
    In all honestly, it would be better for the autofeed to deliver fewer and more relevant results than including the kitchen sink. I am glad however that this is actively being worked on.

    I have a plugin in wordpress that I had used to include shops directly by copy-pasting the PHP code, but of course as soon as I edit a page, the php I paste gets screwed-up by the visual editor which is of course why I had hacked the plugin. If there were some way the plugin would just re-add the code.... no that sounds complicated... never mind.

  19. #19
    Full Member JessieJ's Avatar
    Join Date
    July 13th, 2006
    Location
    Seattle, WA
    Posts
    426
    heya,
    You would just download Jing. But be warned, they have really limited monthly bandwidth, but as long as it's not going to a large audience, it works great.

    Jessie

  20. #20
    ABW Ambassador IOWNIE's Avatar
    Join Date
    March 23rd, 2006
    Location
    Katy, Texas
    Posts
    634
    Thank you JesseJ - can't wait to start playing with this

  21. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Plugin to Insert PHP into WordPress Posts
    By Uncle Rico in forum Blogging, Mobile and Social Media
    Replies: 34
    Last Post: June 8th, 2010, 11:28 AM
  2. WordPress Plugin
    By Xarzu in forum Midnight Cafe'
    Replies: 0
    Last Post: January 28th, 2010, 12:30 PM
  3. Replies: 1
    Last Post: October 10th, 2009, 06:39 PM
  4. Popshops Drupal plugin and PHP
    By lloydl in forum PopShops
    Replies: 6
    Last Post: February 2nd, 2009, 05:23 PM
  5. Popshops WP Plugin
    By ggljohnson in forum PopShops
    Replies: 2
    Last Post: March 8th, 2008, 01:12 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
  •