1

I want to combine block with price and block with quantity. QTY block without button "add to cart".

I found in theme's catalog file :

Magento_Catalog/templates/product/view/addtocart.phtml.

I see qty block template. And I found file

/magento_root/app/code/Magento/Catalog/view/base/templates/product/price/amount/default.phtml with price block.

How can I combine these two template?

I try to copy block what I want, but I have exeption.

1

I understood that it's not easy and decided to find more easily way. I put two blocks in wrapper and move this block after product info. Then I move blocks with CSS. In my case:

<container name="product.info.price.wrapper" htmlTag="div" htmlClass="product-info-price-wrapper" />
<move element="product.info.price.wrapper" destination="product.info.main" after="product.info.stock.sku" />
<move element="product.info.price" destination="product.info.price.wrapper" before="-" />
<move element="product.info" destination="product.info.price.wrapper" after="-" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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