0

How do I move the add to cart button beside the price? In the category product list.

enter image description here

eventually I want something like this. Where do I completely edit the layout for the product list? enter image description here

5
  • its hard to answer without seeing the logic behid this page Commented Aug 19, 2022 at 18:15
  • share your source code then maybe some can answer Commented Aug 19, 2022 at 18:16
  • it's the default source code from luma theme Commented Aug 19, 2022 at 22:13
  • basic css skills.. you should learn css in particular flex and grid for your case Commented Aug 20, 2022 at 6:10
  • I know css. I found the answer myself posted below, which is changing the grid.phtml Commented Aug 22, 2022 at 17:40

2 Answers 2

0

Its simple css, Just make the button width smaller and place it beside the price using flex properties.

1
  • this doesn't work because they're in separate divs to begin with Commented Aug 22, 2022 at 17:37
0

I found the answer myself for just tinkering around the template. I just needed to get the file "grid.phtml" and put it on my custom theme from luma. put the add to cart in the save div section as the price button. As the answers above css alone won't help it because of the reason it is on another separate div so I had to transfer both of them on the same div so that they can be edited accordingly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.