I have two situations that I cant solve and need help.
I'm trying to show installments information in my product page, so I've created a new module, with a block, a helper (to get module configs) and a simple template file, so I link the template with a block throuh the
catalog_product_view.xml layout file:
<?xml version="1.0"?> <page layout="2columns-right" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceContainer name="content"> <referenceContainer name="product.info.price"> <block class="Vendor\Module\Block\Parcelamento" after="product.price.final" name="product.info.price.parcelamento.block" template="Vendor_Module::list.phtml"> </block> </referenceContainer> </referenceContainer> </body>
The second situation is: In my print, see de price value as zero (red marked), this occurs because my Block PHP needs my product instance, and how can I pass the product object to my block using layout files? Is that possible? I've read somethings about
<arguments> tags inside a
<block>, but I think it is just for simple arguments, like strings.
Any help is apreciated.
Thanks in advance.