draekko / woocommerce-pay-what-you-want

Woocommerce plugin
GNU General Public License v3.0
9 stars 5 forks source link

Products don't make it to shopping cart #1

Open Loganfacetimer opened 9 years ago

Loganfacetimer commented 9 years ago

I've installed the pay whatyou want plugin on my wordpress site and had a few issues. From certain devices (and the devices change and are seemingly random), users are unable to send a product to shopping cart. When selecting a product that uses variable pay and clicking the "add to cart" button, it directs them to a shopping cart pages that jsut says "Cart Empty". This has never happened on my own computer, but it happens on my phone, on other laptops periodically. I fixed this once by unchecking the "Enable/Disable option to turn plugin on or off" box in Woo commerce settings under the "pay what you want" tab, updating the site, then rechecking the box. However, after not making any edits to the site, this problem just arises again, but on different devices.

Do you have any tips or fixes for this?

Thanks so much

draekko commented 9 years ago

The plugin goes in deep to WooCommerce functions and overrides a lot of stuff to do its magic. Could be any number of issues since i haven't had the chance to update the code in a while and there have been quite a few updates to WooCommerce. My development machine/server is kind of in a zerched state right now and my personal situation doesn't permit me to get another one.

One thing to make sure though is to set a price for the item as normal as well as in the fields used for the plugin. There was an issue originally i couldn't overcome with WooCommerce setting stuff to 0 if no price was listed in the default price field.

draekko commented 9 years ago

I managed to to test it from another clients system and it works as long as you set a regular price in woocommerce as well as setting the price (min., reg., and max.) in the plugin settings.

draekko commented 9 years ago

One other thing make sure on mobile devices that javascript and cookies are functional because it will fail if that isn't available on the browser.

ghost commented 9 years ago

I'm having the same issue except that I have a regular price entered now and it still doesn't work.

At first I couldn't even get the Add to cart button to show up until I found this issue and entered a regular price for the product. Now the button shows. I click it and it seems like it's doing something except that it doesn't. It just redirects back to the same page and when I go to the cart there is nothing in there.

draekko commented 9 years ago

Hi Ryan,

I won't be looking into any issues till next week. I did look at the reference site from one of my clients i see it currently works there.

You can visit https://sebastientouchette.com to see it works. (go to albums page and try some items)

I would need way more information that just saying it doesn't work. Have you checked the server logs for errors? what server is being used? php version? browser ? was javascript on in the browser? some plugins or extensions from your browser can interfere, have you tried turning them off? As for setup how is the item set up exactly? Is there anywhere i can see it in action?

draekko commented 9 years ago

Also make sure there isn't anything in woocomerce or wordpress interefering. I had several plugins interfere with various other plugins in wordpress during development (not just with this one). Make sure to test with them off and just wordpress, woocommerce and this one to eliminate any other source of problems.

draekko commented 9 years ago

Finally diasble any caching if you are using any on the server.

ghost commented 9 years ago

Thank you for the speedy reply!

Well lets see... no errors in logs. Apache 2.2.15. PHP 5.5. Firefox it will actually hide the Processing screen and redirect back to the same page but in IE and Chrome will not ever leave that Processing screen or redirect. Yeah javascript is on and cookies are enabled. I really highly doubt it's some sort of browser issue and would even go as far as to say it definitely isn't. I have no other plugins activated at the moment except for woocommerce and PWYW.

I noticed this set_product_js function in woocommerce-pay-what-you-want.php line 1164 is outputting some jquery code above where jquery is actually included in the page so it causes a JS error, this happens on your site as well. I can't figure out what this code is supposed to actually do, possibly something you used somewhere before with the custom js code.

No worries then if you're busy. I am in no rush. But I will likely figure it out eventually and can possibly post a fix here if I do.

Really glad I found this plugin! Thanks for taking the time to make it and making it freely available and supporting it =)

draekko commented 9 years ago

Main reason it's free and open sourced is so people can figure this stuff out since the code is available to them before purchase ;) As for support i can't promise much but i do try considering i'm not getting paid. :)

Anywho my way of paying it forward somewhat.

As for the JS there are portions of JS that are embedded because of issues with the plugins i mentioned in my prior post. Using a script file was causing an out of order loading of the script. Before i forget make sure to set a min and max value with the min. being a non zero value. I need a way to make it more obvious and have better error trapping eventually for that particular case.

Last post till next week, if you find anything worth fixing let me and i'll see if i can integrate it.

Glad you enjoy it.

On Thu, Jan 1, 2015 at 4:19 PM, Ryan notifications@github.com wrote:

Thank you for the speedy reply!

Well lets see... no errors in logs. Apache 2.2.15. PHP 5.5. Firefox it will actually hide the Processing screen and redirect back to the same page but in IE and Chrome will not ever leave that Processing screen or redirect. Yeah javascript is on and cookies are enabled. I really highly doubt it's some sort of browser issue and would even go as far as to say it definitely isn't. I have no other plugins activated at the moment except for woocommerce and PWYW.

I noticed this set_product_js function in woocommerce-pay-what-you-want.php line 1164 is outputting some jquery code above where jquery is actually included in the page so it causes a JS error, this happens on your site as well. I can't figure out what this code is supposed to actually do, possibly something you used somewhere before with the custom js code.

No worries then if you're busy. I am in no rush. But I will likely figure it out eventually and can possibly post a fix here if I do.

Really glad I found this plugin! Thanks for taking the time to make it and making it freely available and supporting it =)

— Reply to this email directly or view it on GitHub https://github.com/draekko/woocommerce-pay-what-you-want/issues/1#issuecomment-68498597 .

draekko commented 9 years ago

Do you have a link so that i can see the issue in action?