• Resolved graftedin

    (@graftedin)


    Why do you take the lazy way out and do this.

    
    <a class="woocommerce-LoopProduct-link woocommerce-loop-product__link" href="https://mysite.com/product/myproduct/"><img width="300" height="150" class="attachment-woocommerce_thumbnail size-woocommerce_thumbnail" alt="" src="https://mysite.com/wp-content/uploads/2014/12/myimage.jpg"><h2 class="woocommerce-loop-product__title">My Title</h2>
    	<span class="price"><span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">$</span>xxxx</span> – <span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">$</span>xxxx</span></span>
    </a>
    

    Instead of this….

    <a class="woocommerce-LoopProduct-link woocommerce-loop-product__link" href="https://mysite.com/product/myproduct/"><img width="300" height="150" class="attachment-woocommerce_thumbnail size-woocommerce_thumbnail" alt="" src="https://mysite.com/wp-content/uploads/2014/12/myimage.jpg"></a>
    <a ... ><h2 class="woocommerce-loop-product__title">My Title</h2></a>
    	<span class="price"><span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">$</span>xxxx</span> – <span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">$</span>xxxx</span></span>

    Wrapping multiple elements in the same a tag creates some layout problems. For example if I want to add a description after the title I then have to close off the previous a tag or else the description is also linked.

Viewing 13 replies - 1 through 13 (of 13 total)
  • I don’t see the problem in that? Since you’re already customizing you’re free to change the anchor tags.

    Thread Starter graftedin

    (@graftedin)

    Its bad coding. If I mouse over the thumbnail should the title text show a hover state? No it shouldn’t.

    You’re missing the point. I don’t want to customize ANYTHING! I want to install woo, add my products, and be done.

    That’s your opinion.

    If you don’t want to customize anything you don’t need to. Either accept how it is or use a theme that fits your need.

    I want to install woo, add my products, and be done.

    Maybe a managed solution like Lightspeed or Shopify better fits your needs?

    Thread Starter graftedin

    (@graftedin)

    ….that’s the core problem with this plugin. You are relying on Woo compatible themes to do the heavy lifting of displaying everything properly. The better solution would be to have everything work correctly out of the box and then we only have to override your theme if we really need to customize something.

    Thread Starter graftedin

    (@graftedin)

    Maybe a managed solution like Lightspeed or Shopify better fits your needs?

    I CAN’T!!!!!!!!!!!!!!! I already have a site built and a theme built and NOT BY ME!

    I have the job of installing Woo and getting products set up. I don’t want to rebuild their entire site just to switch to a new eCommerce plugin.

    The better solution would be to have everything work correctly out of the box and then we only have to override your theme if we really need to customize something.

    That’s exactly how it works. But unfortunately a million of users also means a million of different tastes/requirements/wishes. For many the out-of-the-box solution is fine.

    If you’re not happy with the default, customize it, find a theme or hire a designer.

    Thread Starter graftedin

    (@graftedin)

    I AM A DESIGNER!!!!!!!!!!!!! I’ve been doing development for 18+ years!!!!!!!!!!!!! I do know what I’m talking about. And your plugin DOES NOT WORK OUT OF THE BOX!

    I had to “rebuild” subcategory list pages (with only subcategories), category (with products) to get all of this to work. I had to fix problems with sloppy coding (not backwards compatible) and sloppy html because a tags are not used conventionally. And I had to reorder check out fields because you are not using standard convention that is used all over the internet. None of this is to “customize” anything. This is just to get it a standardized state that I would have expected when I first installed.

    I was going to complain about title tags not showing in the browser and style sheets loading last….but I did my research and realized that those were a problem with the theme….which I didn’t install. I say this so you know I’m not complaining about everything I find. I’m doing everything I can to search out solutions that I’m over looking before posting here. Everything I’m complaining about is stuff that is wrong.

    Let my clarify, WC is not “my plugin”. I’m not a WooCommerce Core developer.

    Second, you don’t have to YELL!!!!!!!!! I’m not deaf (or blind? ?? )

    Third, don’t confuse opinion with fact. “The a element may be wrapped around entire paragraphs, lists, tables, and so forth, even entire sections, so long as there is no interactive content within (e.g., buttons or other links)”. I think there’s nothing wrong with the way WC uses the tag.

    I don’t know why you had to rebuild subcategory pages or what kind of sloppy coding you are talking about, but let’s keep this topic clean (i.e. a single subject).

    Thread Starter graftedin

    (@graftedin)

    I appreciate your help. I’m not posting here because I need help. I’m posting so that if others are having the same problems they can find solutions to these problems….and I’m hoping the Woo is listening and considering my solutions.

    You maybe “correct” about a tags. But I’m telling you that from 18+ years of experience it creates problems when you wrap multiple elements in the same a tag. Just like in most cases external files (images) can have spaces in the file name. However I have seen weird errors come up as a result of that so I don’t have spaces in the file name.

    I’m asking Woo why they are wrapping multiple elements in a tags. It creates problems.

    I think it is nice to for graftedin to share development opinions and better ways to improve WooCommerce and have the plugin authors consider these coding solutions.

    I don’t quite understand anything wrong which which he posted. I’m sure WooCommerce and all theme developers and plugins all appreciate possible suggestions and features to improve their developments.

    That’s why themes and plugins always have updates to improve, technology is always improving and always changing.

    • This reply was modified 6 years, 3 months ago by CarolLeung.
    • This reply was modified 6 years, 3 months ago by CarolLeung.

    Suggestions are always nice, but quotes like these triggered me:

    Why do you take the lazy way out and do this

    Its bad coding.

    I don’t want to customize ANYTHING!

    …but I do want EVERYTHING exactly the way I like it

    Luminus Alabi

    (@luminus)

    Automattic Happiness Engineer

    Hi @graftedin,

    I’m closing this as it is not a support question.

    The WooCommerce plugin is open source. If you feel strongly about something, feel free to head on over to the GitHub repository and open an issue or submit a Pull Request.

    I would implore you to keep all discussions civil and remember that you are communicating with human beings and not random avatars on the internet.

    @josk79, thanks for weighing in and keeping things civil.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Why are product images, title, etc all wrapped in the same a tag?’ is closed to new replies.