Forum Replies Created

Viewing 9 replies - 31 through 39 (of 39 total)
  • Thread Starter SYPOMark

    (@sypomark)

    Hi Mike,

    Thanks for your message.

    No, sadly, that didn’t work. The Add to Basket button didn’t show up on any page of any type using that code.

    With kind regards,

    Mark

    Thread Starter SYPOMark

    (@sypomark)

    Hello again.

    I think I’m going to give up on this one. Thank-you both very much for your help. I have placed conditional tags in the function as you suggested, Mike, but it stops the button appearing at all, as it did to start with.

    I even pasted in a variation on the code found here and that didn’t work either, like so:

    if ( is_product_category() ) {
    
      if ( is_product_category(array('Aerosol Testing', 'Microscopy', 'Mixing Media', 'Sample Preparation', 'Spare Parts', 'Weighing' ) ) ) {
        echo 'Testing';
      } else {
        echo 'Rhubarb';
      }
    
    }

    This is not the first thing that seems to not be working for me with the Mysite theme installed. I don’t know what is going on with it, though I expect it is probably down to user error!

    I’ll just have to go back to using the code without placing it in conditional tags and hide the instances I don’t want with CSS. Not the most elegant solution, but at least the user’ll be none the wiser.

    Thanks both again.

    With kind regards,

    Mark

    Thread Starter SYPOMark

    (@sypomark)

    Hi Mike,

    Thanks for coming back to me again.

    I’m confused though: I thought I’d already tried that, if you see my original post:

    if ( is_product_category() ){
    add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 20 );
    }

    What was wrong with this particular conditional tag?

    With kind regards,

    Mark

    Thread Starter SYPOMark

    (@sypomark)

    Hi James,

    Thanks for your extremely rapid response.

    That added the ‘Add to Basket’ button to every page as well. They’re only VISIBLE on the product category pages, but that’s only because of CSS.

    I’m looking for a solution that’ll add it exclusively to product category pages WITHOUT having to hide the m in CSS. I know there must be a way! My lack of knowledge is frustrating me!!!

    With kind regards,

    Mark

    Thread Starter SYPOMark

    (@sypomark)

    Hi Mike,

    Thanks for your reply. I am always impressed when the author of a plugin/app takes the time to interact on these forums.

    Unfortunately, that is not what is happening. With the mysite theme I am using, the add to basket buttons do not show up by default. I have used a css workaround – bit clumsy – but I was wondering if there was a better way.

    With kind regards,

    Mark

    Thread Starter SYPOMark

    (@sypomark)

    Hi Charlie,

    Thanks very much for your detailed reply.

    I have implemented what you suggested and it works perfectly.

    One additional tweak: the form fields are now displayed in order of Email, Name(title renamed), Rating, Review Content. What would be the best way to re-order these? Would editing the relevant file in the rich-review plugin folder be the best option? It’s not essential and my customer has yet to ask for it, but in case they do…

    With kind regards,

    Mark

    Thread Starter SYPOMark

    (@sypomark)

    Hi Claudio,

    Thanks for your swift reply.

    That is a very simple and elegant solution. I had not thought of that. I’ve implemented, and it works just as you said it would. Now all I have to do is style it up.

    Thanks again.

    Mark

    Thread Starter SYPOMark

    (@sypomark)

    Hi Mike,

    Thanks again for your swift help.

    The featured products are now displaying with a truncated description.

    Hopefully this helps somebody else as well.

    With kind regards,

    Mark

    Thread Starter SYPOMark

    (@sypomark)

    Hi Mike,

    Thanks for your extremely rapid response. Your answer was certainly not out-of-date, having been posted only 10 days ago!

    And it worked! Now all I have to do is work out how to shorten the outputted text to a certain number of characters!

    It’s probably really obvious, but my knowledge of php and php with wordpress is quite limited.

    Thanks again,

    Mark

Viewing 9 replies - 31 through 39 (of 39 total)