Skip to main content
8 events
when toggle format what by license comment
Jul 21, 2017 at 7:16 comment added Mark Bowen Hi Sam. Thank you for that code. It came up with an error so I'll check I didn't do something silly again. Will let you know how I get on.
Jul 20, 2017 at 19:49 comment added Sam I have updated the code, Not sure about the link coming up right away so try the amended code if not revert back to what posted first.
Jul 20, 2017 at 19:46 history edited Sam CC BY-SA 3.0
added 792 characters in body
Jul 20, 2017 at 19:38 comment added Mark Bowen Okay sorry got it working now. I had left the old shortcode in and it was playing up because the function was being called twice. One slight problem though is that when you add something to the cart now the link doesn't come up immediately. You have to refresh the page once for the text to appear and then on all subsequent add to cart button presses it updates fine. Is there a way to get it to show as soon as the first add to cart button is pressed? Many thanks for the help on this, it's much appreciated.
Jul 20, 2017 at 19:33 comment added Mark Bowen I apologies. I have things muddle up in my head. The > 0 is obviously correct. Unfortunately I am getting that error above though.
Jul 20, 2017 at 19:31 comment added Mark Bowen Hiya. Thanks for that. I'm guessing that code goes in the shortcode part of my code above but when I put that in it came up with an error : ParseError thrown syntax error, unexpected end of file Not sure what that means or how to fix it though? Also the if statement you've written says if count is more than 0 but I believe that may be wrong as I don't want anything to show on the page if the cart is empty so need something more along the lines of if get_cart_contents_count() = 0 or something like that?
Jul 20, 2017 at 19:06 history edited Sam CC BY-SA 3.0
added 540 characters in body
Jul 20, 2017 at 18:59 history answered Sam CC BY-SA 3.0