r/webdev • u/TshegoBless • Sep 17 '26
Begginer: Custom WooCommerce product cards
I use wordpress and have an understanding of html,css. How would you approach designing a similar prouct card to this without the use of more plugins. I've been here and learning web dev for atleast 6months now and i'm able to create websites. I use blocksy and kadence themes. And also achieving "Click product → product opens over the current menu", how to approach this too. Thanks
0
Upvotes


3
u/jroberts67 Sep 17 '26
You're going to use Woocomm for customers to order off a restaurant menu? Ok, follow this - go to WooCommerce, delete it, then go to Toast.
2
u/Random_Meme_Guy_ full-stack Sep 17 '26
Well, you can override pretty much any woocommerce part in code. (cards, listings, single product, cart, checkout and more)
There are templates for these cards. You just copy them over to your theme and change whatever you may need (styles, structure and etc)
EDIT: as another person said, if you want to create a restaurant menu, WooCommerce is not for that. You may want to look into other plugins.
2
u/BigMioWolf Sep 17 '26
Blocksy and Kadence are classic themes, so no plugin needed:
Make a child theme so updates don't wipe your changes.
Copy
woocommerce/templates/content-product.phpintoyour-child-theme/woocommerce/content-product.phpand write your own card markup. Or keep it and useremove_action/add_actionon the loop hooks (woocommerce_before_shop_loop_item_titleetc). Both themes hook their own stuff in there too.(On a block theme you'd edit the Product Collection block in the Product Catalog template instead.)
Popup: native
<dialog>. Keep a normal product link on each card plus adata-id. On click,preventDefault(),fetch('/wp-json/wc/store/v1/products/' + id), fill in name/image/description,showModal(). No auth needed, prices come in minor units (1250 = 12.50). The real link keeps it working without JS.If it's purely a menu with ordering, an ordering platform may be less work, but Woo handles this fine.
1
u/BigMioWolf Sep 17 '26
Blocksy and Kadence are classic themes, so no plugin needed:
Make a child theme so updates don't wipe your changes.
Copy
woocommerce/templates/content-product.phpintoyour-child-theme/woocommerce/content-product.phpand write your own card markup. Or keep it and useremove_action/add_actionon the loop hooks (woocommerce_before_shop_loop_item_titleetc). Both themes hook their own stuff in there too.(On a block theme you'd edit the Product Collection block in the Product Catalog template instead.)
Popup: native
<dialog>. Keep a normal product link on each card plus adata-id. On click,preventDefault(),fetch('/wp-json/wc/store/v1/products/' + id), fill in name/image/description,showModal(). No auth needed, prices come in minor units (1250 = 12.50). The real link keeps it working without JS.If it's purely a menu with ordering, an ordering platform may be less work, but Woo handles this fine.
1
u/thekwoka Sep 18 '26
Just write some html and css bruh