Error with Name Your Own Price…
-
I installed the plugin and activated it. After I went to WooCommerce products I only had one listed and this error:
Fatal error: Call to a member function is_featured() on a non-object in /home/content/81/11461881/html/wp-content/plugins/woocommerce/admin/post-types/product.php on line 252
Many thanks especially if this is a common issue.
shatner-name-your-own-price-for-woocommerce
https://www.ads-software.com/plugins/shatner-name-your-own-price-for-woocommerce/
-
Hey Syxguns,
I’m looking into it right now, someone had mentioned it to me before, but I wasn’t seeing it with my products.
Is there anything about the product you are using that might make it make sense to be running that codepath.
Like a complex product of some sort?
Let you know if I find anything,
Cheers,
Sean
Hey Sean,
Thanks for the reply. I’m not running any changes script wise or Woocommerce shopping cart wise that would or should interfere with the plugin. In fact I deactivated all plugins when testing it but the only thing that returned all of my products back to the page was to deactivate Shatner plugin.I don’t know if it would cause the issue, but I am running Kontrol theme by cssigniter https://www.cssigniter.com/ignite/themes/kontrol/ I have a a couple of plugins give me trouble using this theme, but the theme is packed full of great widgets of its own.
I would like to use your plugin if the code error could be found. Here is what is happening. I installed the plugin through “Plugins > Add New” in WP and activated it.
I have a total of 26 items in the products page. all of them are downloadable, but that shouldn’t matter. When I go to the Products page in Woocommerce at the top I see that there are 26 items, but only one displays on the page, the rest of the page is white in all columns. In the “Featured Item” category, where the star is located, is where the code runs from the top of the page to the bottom of the page, but only in that column. If I go to page two of the items, it is identical to page one showing only one item, and the code being in the featured item category. The rest of the page is blank.
I’ve managed to grab this information for you using Firebug:
<a title="Toggle featured" href="https://www.place4musicians.com/wp-admin/admin-ajax.php?action=woocommerce-feature-product&product_id&_wpnonce=cf9a349376"> <br> <b>Fatal error</b> : Call to a member function is_featured() on a non-object in <b>/home/content/81/11461881/html/wp-content/plugins/woocommerce/admin/post-types/product.php</b> on line <b>252</b>
I hope that is a little information to help you debug the problem. Let me know if you need or would like screen shots of the error.
Thank you,
Larry (Syxguns)Hey Larry,
I updated the plugin to do a more clean solution once I figured out how to do it, it now pulls a separate template instead of using the filter for price(html) which surprisingly was being used to display in the admin column view. Which was causing that error.
Have a look at v0.5 and see if that fixes it for you.
Cheers,
Sean
Thank you Sean! It does work now, but I was wondering if you could make one change to it? It may not work the way WooCommerce is set up, but you have to leave both the “Price” and the “Sale” option blank for the “Name Your Own Price” to work. This is fine for use, and I’m happy with it, but one improvement would be:
Price:
<s>$1.25</s>
Sale: Free!
Name Your Own Price:This in a sense gives the customer an opportunity to donate for the item.
Edit: No, there still seems to be a small issue, but once again it could be my template in WP. For a picture of the problem please jump over to my forum. https://place4musicians.com/music/showthread.php?24-Information-for-Sean&p=25#post25
Yea I think I can do that, most likely, mind marking this thread as resolved and we can move onto that as a feature request?
There still seems to be a small issue, but once again it could be my template in WP.
Sons – Masters of the Flattery in shop
Related Products should be on the next line, and an Add to Cart button should be present. Also the plugin doesn’t stay enabled.<img src=”https://i78.photobucket.com/albums/j101/syxguns/sons_zps6c137215.jpg” border=”0″ alt=”Store Error photo sons_zps6c137215.jpg”/>
Here is what I get when I turn the plugin off:
<img src=”https://i78.photobucket.com/albums/j101/syxguns/sons2_zps8de70078.jpg” border=”0″ alt=”store error 2 photo sons2_zps8de70078.jpg”/>
Hey Syxguns,
I haven’t seen where the add to cart is missing when there’s a price, but there was an issue with templates when I moved it over to a template to fix the original admin issue.
I’m still looking into whey sometimes the product won’t stick as a name your own price, but give 0.7 a shot and see if that fixes the template issues.
Cheers,
Sean
Sean,
It seemed to fix most of the issues, but there is still not an “Add to Cart” button next to it. I think this has to do with the template that I’m using, and it will be difficult to see if others are facing the same issue at this point because the feature is relatively new.I can’t use it currently because of the following:
1) No add to cart button, but I have seen it on another site that had the button. This is why I believe it has to do with my theme: https://www.cssigniter.com/ignite/themes/kontrol/2) I would like it if at least the original price of the product was shown, but having the original price crossed out with the second price saying, “Donation” would be great.
If others do not have the same issues that I have, then I would not worry about trying to fix it to work with my theme. I can always add a donation area to the shopping cart, even though I would like for it to be available by item.
I dont know if I can ask this here but, ive installed the plugin with woocommerce on wordpress 3.7.1 and I dont get the checkbox.
Hey KriptonWarrior,
Yea kinda thread-jacking but it’s all good.
Are you using the wordpress multi-site because I’ve seen an issue with that, but I have wordpress updated to 3.7.1 and I definitely see the checkbox, what version of woocommerce?
Is it possible for you to make me an admin temporarily to have a look?
Cheers,
Sean
Sean,
A quick little update for you. I have a friend that uses WooCommerce as well. He uses a theme by the same makers that I do. I could do it because I’m an Admin on his site, but I don’t make those kinds of adjustments as it’s his site. I’ve asked him to give your plugin a try to see if he has the same issue that I was having. If he does, then I know that it is most likely a theme problem. I should have an answer for you soon.Sorry Sean, yeah I guess I did do a post jacking. I apologize since I don’t really use these that much. I am using woo commerce version 2.0.19. Any suggestions would be greatly appreciated.
- The topic ‘Error with Name Your Own Price…’ is closed to new replies.