Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • 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,
    Ben

    Hi,
    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,
    Ben

    Hi 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

    in reply to: Mobile responsiveness CSS not working #605124

    Thanks Rikard — that code appears to have worked!

    Ben

    in reply to: Mobile responsiveness CSS not working #604623

    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&#8221;); } }

    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

    in reply to: Mobile responsiveness CSS not working #604561

    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,
    Ben

    in reply to: Mobile responsiveness CSS not working #604153

    Hi Yigit,

    Regards,
    Ben

    • This reply was modified 8 years, 8 months ago by benrroberts.
    in reply to: Mobile responsiveness CSS not working #601808

    Hi 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; } }

Viewing 8 posts - 1 through 8 (of 8 total)