Forum Replies Created
-
AuthorPosts
-
May 30, 2016 at 1:24 pm in reply to: Enfold blocking Add to Cart function on Foodpress Plugin #640330
Hi Josue,
I have to strongly disagree here — your theme is affecting the basic Woocommerce functionality as the third-party plugin works fine with just WooCommerce using WooCommerce hooks. I’ve done the work isolating the 12 letters of your function which causes the error but I don’t know enough to know why InsertBefore doesn’t work but InsertAfter does — there must be a reason. I’ve also highlighted for you that Sublime Text is showing it as a function — does this strike you as odd or help you to figure out a possible reason for this?
Happy to help locate a solution by doing what I can my end, but I have to insist a work-around is found here, or at a minimum this issue is escalated to someone who wrote the codebase.
Regards,
BenMay 29, 2016 at 11:56 am in reply to: Enfold blocking Add to Cart function on Foodpress Plugin #639950Hi,
In the woocommerce-mod.js I eventually isolated the issue: it was in Line 25 where the + & – buttons live,var minus = jQuery('<input type="button" value="-" class="minus">').insertBefore(newNum),
Specifically .insertBefore is coloured as a function in Sublime unlike insertAfter & is causing the issue. If I remove this line everything works, & if I use .insertAfter instead then everything works. However, in the former case there’s no minus button & in the latter there’s a misplaced minus button sitting to the right of the plus button not the left of it. I would like formatted buttons & everything to work. Can you suggest a re-write to have this all work, or if there is something associated with .insertBefore elsewhere in my set-up, how I would find that (I can’t think of a ctrl+f way of doing that?)?
Thanks,
BenMay 28, 2016 at 3:57 pm in reply to: Enfold blocking Add to Cart function on Foodpress Plugin #639788Hi Josue,
I commented out & it solved the Add to Cart issue but it removed all the other dependent functionality (not sure which is Enfold and which Foodpress), like showing the dynamic number of items on the mini-cart & having adjust quantity buttons in the cart & on product listing :(
Is there a way of isolating this single action re. Add to Cart button?Regards, Ben
Thanks Rikard — that code appears to have worked!
Ben
Hi Yigit,
The referred thread doesn’t really add anything here — I’d already hid the background image with Andy’s code above. I’d actually like to have the ability to replace the background image of a colour section with another image for mobile (as the text is cut off otherwise). I’m worried this isn’t fully possible so interested in your thoughts, as currently when the mobile image version displays it has removed the button that sits in that colour section for desktop.
Here’s my set-up on the homepage in WP:
Desktop = colour section w/ From Hasty to Tasty graphic + a button inside it
Mobile = if I run below in CSS I get a replacement image but no button.@media only screen and (max-width: 767px) { #background-img-responsive { content:url(“https://gastronoms.com.au/wp-content/uploads/newimage.jpg”); } }
I’d like to know if possible a) if I can replace the image in mobile AND have the button remain & b) whether the content:”url” code is best practice?
Ben
Hi Andy,
Thnaks – that indeed made the background hasty-to-tasty image stop displaying!
If I want to now display a separate background image there for mobile devices should I use ‘ content:”url” ‘ instead of ‘ display: none ‘ or is there a better way to do this?
Thanks,
BenHi Jordan,
I’d prefer to fix it myself unless I need a last resort. I think the initial issue was due to caching or the like as after a couple of hours the images had disappeared. Well every image on the page except the colour section background which is what I want removed & I guess isn’t captured under the img tag?
So I modified the code to try to achieve the removal of just the colour section background per the below, where I’ve named the colour-section as ‘background-image-responsive’ but it hasn’t worked (and other images returned so I know the code has processed). Any ideas for me?
@media only screen and (max-width: 767px) { .background-image-responsive { display: none !important; } }
-
AuthorPosts