WooCommerce STILL using TABLES????
-
Why is WooCommerce still using tables for layout for NON-TABULAR data?
The cart is not tabular data, it is a list. therefore it should be using
li
ordiv
tags.Other templates are using tables for small sections of content such as
order-details-customer.php
which are not tabular data.
-
No it doesn’t – https://imgur.com/8H5KGxC That looks a mess! 390px wide. Any custom columns that are added don’t get removed
Are you sure you’re running the latest version of WordPress — 4.3? This is what it looks like for me, even with custom columns added by Yoast SEO:
I’ve done that before and you have to have at least 50% width on the pseudo element to make the title spacing worthwhile, which loses valuable space on the screen
That was an example, I wasn’t suggesting you copy their code verbatim — that would be silly. But the point is, you can treat the cells just as divs if you like in your CSS. Markup as desired.
—
I get the feeling that you’re very attached to a specific way of doing things, and you’re sticking to your way regardless of any input we may have to offer, so at this point I think it’s best to just wish you the best of luck, and hope that your boss starts paying you for the hours you work overtime ( which I think we all agree is a crying shame ?? )
Best of luck! ??
variable.php is a mess anyway so that needs updating urgently
Pull requests are always welcome on our GitHub Repository! https://github.com/woothemes/woocommerce/
Are you sure you’re running the latest version of WordPress — 4.3? This is what it looks like for me, even with custom columns added by Yoast SEO:
WooCommerce Products is still messy! Even worse actually
That was an example, I wasn’t suggesting you copy their code verbatim — that would be silly. But the point is, you can treat the cells just as divs if you like in your CSS. Markup as desired.
To allow enough room for titles in the left hand column / pseudo element it would need to be at least 50% leaving hardly any room for the actual cart contents
I get the feeling that you’re very attached to a specific way of doing things, and you’re sticking to your way regardless of any input we may have to offer
I haven’t studied a 4-year degree for nothing.. Tables are bad and unless it is structured as a table, then lists/divs should be used.
Pull requests are always welcome on our GitHub Repository!
I’d probably end up re-writing the whole of the template files ??
I haven’t studied a 4-year degree for nothing.. Tables are bad and unless it is structured as a table, then lists/divs should be used.
Honestly, when the rubber meets the road, a four-year degree counts for very little. I happen to have one, and most of what I learned earning it was useless, and it didn’t even mention some essential principles around security best practices — nonces, cross-site scripting, etc.
Some of the best WordPress developers I know are mostly self taught, and I know of at least one person on the Core Leads who never even finished college.
Having a slip of paper means just about that. Having the knowledge and experience of what happens in the real world with client projects means everything.
I’d probably end up re-writing the whole of the template files ??
Hey, if you can do an improvement and still be backwards compatible for legacy sites, we’d be glad to have your input.
It the fact that I bothered to learn in detail about the best practices about web development. Most self-taught developers don’t follow the most basic web standards! They may be the ‘best WordPress developers’ but if the code doesn’t follow standards it’s wrong.
WooCommerce is a good example.. there’s a huge mix of CSS class naming conventions.. is it
class="thisClass"
orclass="this_class"
. yes, both are correct, but choose a standard and stick to it.I’d rather just create a plugin to fix WooCommerce myself, if you can reassure me that nothing will be added that will make me keep updating the plugin as much as WooCommerce updates. It’s literally every 2 days now
I hope you’re not editing core files… see https://docs.woothemes.com/document/template-structure/
I hope you’re not editing core files…
I’m not that stupid…
I’ve always copied the templates directory into the theme directory and renamed to woocommerceI’ve made a plugin before which checked in the theme directory for a woocommerce folder before using the plugin’s woocommerce directory and then defaulting to the woocommerce plugin itself.
It’s just that WooCommerce has updated so much and I’ve made it in my own time that I just haven’t been able to keep up with the WooCommerce updates. I will update it to the latest Woo templates if I know that the templates will not be updated for a few months
apologies for jumping around, I’m grabbing quotes to reply to rather inconsistently at the moment…
It the fact that I bothered to learn in detail about the best practices about web development
There’s a difference between standards when building your own standalone project, and standards when maintaining a public project with a legacy install base — many of whom may be basing custom code off the stylistically inconsistent classes. If the classes change, their CSS stops working, and they very rarely accept “but we were just correcting some coding style issues” as a rationale.
I’d rather just create a plugin to fix WooCommerce myself, if you can reassure me that nothing will be added that will make me keep updating the plugin as much as WooCommerce updates. It’s literally every 2 days now
Those are point releases, and GitHub makes it easy to see what has changed between versions.
https://github.com/woothemes/woocommerce/compare/2.4.2…2.4.3
https://github.com/woothemes/woocommerce/compare/2.4.5…2.4.6
https://github.com/woothemes/woocommerce/compare/2.4.0…2.4.5etc.
Point releases — the third decimal place, in standard WordPress conventions — are normally just to fix things, and rarely (ideally, never) add new features.
Did you cover software versioning and version control systems in your studies? I’m not sure why you’d repeat work modifying templates with each release otherwise.
I’m not that stupid…
Noone said that you were stupid. I’ve seen some very intelligent folks and companies hack core files.
Some old software like OSCommerce even necessitated hacking core files for installing extensions — which were basically just files and lines to change in the core software. Trained to expect that, they learned bad habits early on.
I’ve made a plugin before which checked in the theme directory for a woocommerce folder before using the plugin’s woocommerce directory and then defaulting to the woocommerce plugin itself.
You mean you bundled WooCommerce in a theme? That’s a pretty bad idea. You’d be far better off just using TGM Plugin Activation — https://tgmpluginactivation.com/ — to manage plugin dependencies.
I will update it to the latest Woo templates if I know that the templates will not be updated for a few months
No promises! We normally try to maintain backward compatibility, but should some unexpected conflict arise, or some feature enhancement relating to it — do you really want us to pledge to not work on a part of our codebase for a period of time?
WooCommerce is a good example.. there’s a huge mix of CSS class naming conventions.. is it class=”thisClass” or class=”this_class”. yes, both are correct, but choose a standard and stick to it.
Some of it is legacy code. Standards are great and all, but they’re not the be-all and end-all. Oft times it’s better for a project to not break version control blame history with needless code style commits.
Really really good read on the topic that I can’t recommend highly enough: https://make.www.ads-software.com/core/2011/03/23/code-refactoring/
There’s a difference between standards when building your own standalone project, and standards when maintaining a public project with a legacy install base
Web Standards are web standards.. end of! has nothing to do with legacy code. Using tables for non tabular data for example.
More advanced cart layouts can be achieved with divs compared to tables which make the cart look rubbish!
Those are point releases, and GitHub makes it easy to see what has changed between versions.
I never edit core files, just the templates which create the front end of a store
Did you cover software versioning and version control systems in your studies? I’m not sure why you’d repeat work modifying templates with each release otherwise.
Not in a module, but on my own and in work, yes. It’s just making sure that any updates to files in the WooCommerce templates directory are updated accordingly.
You mean you bundled WooCommerce in a theme? That’s a pretty bad idea
No, it’s the same as copying the templates directory to the theme folder, but instead it is in a plugin. The same way WooCommerce checks in the theme folder for a woocommerce directory, and using those files before the ones in the WooCommerce plugin.. This one checks in the theme folders woocommerce directory first then my plugin, then woocommerce… like:
Order of checking for templates normally in theme
theme directory > woocommerce plugin
Order of checking for templates in my plugin
theme directory > my plugin > woocommerce
– just an extra step in betweenNo promises! We normally try to maintain backward compatibility, but should some unexpected conflict arise, or some feature enhancement relating to it — do you really want us to pledge to not work on a part of our codebase for a period of time?
No, but the release notes with the updated plugin don’t say which files have been updated, whereas core wordpress does. If it said which template files have been changed I could go into my own version and update it.
Some of it is legacy code.
Legacy code maybe, but stick to the same class naming conventions at least
No, but the release notes with the updated plugin don’t say which files have been updated, whereas core wordpress does. If it said which template files have been changed I could go into my own version and update it.
Good idea, this would probably be worth being a bit more explicit about in the release notes. cc: @mikejolley
No, it’s the same as copying the templates directory to the theme folder, but instead it is in a plugin. The same way WooCommerce checks in the theme folder for a woocommerce directory, and using those files before the ones in the WooCommerce plugin.. This one checks in the theme folders woocommerce directory first then my plugin, then woocommerce… like:
Ah, gotcha. We’ve seen folks distributing commercial themes that actually manually
include()
plugins from a subfolder within the theme. This not only can cause conflicts with timing (of when the include runs versus theplugins_loaded
action, but more dangerously, the theme’s bundled version of the plugin wouldn’t get security updates and such as a normal plugin would.I thought that was the case here, happy to have been mistaken.
Ah, gotcha. We’ve seen folks distributing commercial themes that actually manually include() plugins from a subfolder within the theme. This not only can cause conflicts with timing (of when the include runs versus the plugins_loaded action, but more dangerously, the theme’s bundled version of the plugin wouldn’t get security updates and such as a normal plugin would.
I’d never do that, although the other developer at work does – not with woocommerce as I know of
Thanks for understanding! I just want to speed up my development process as I create award winning websites which the default templates built in tables do not suffice for more advanced layouts. I’ve spent an extra week worth of development at home re-doing woocommerce templates to fit the style of the site which is why I want to use the plugin, but with the constant updates I’m sceptical about using it with no mention if templates are updated in the release notes.
Would be awesome if you could start including them with the updates so I can use the plugin i made to speed up build time ??
- The topic ‘WooCommerce STILL using TABLES????’ is closed to new replies.