Aw: Use Address-information in a normal form aswell
If I use the code like this, the product code of the form is not in the input section, but the product id appears at the top of the page
//<code>
require_once (JPATH_SITE.'/components/com_jshopping/bootstrap.php');
print $product_id = \JFactory::getApplication()->input->getInt('product_id');
$product_id = JFactory::getApplication()->input->getInt('product_id');
$product = JSFactory::getTable('product');
$product->load($product_id);
$code = $product->getEan();
//</code>
-------------------------------------------------------
If the code is used in this way, the product code is not written inside the form or at the top of the page.
//<code>
require_once (JPATH_SITE.'/components/com_jshopping/bootstrap.php');
$product_id = \JFactory::getApplication()->input->getInt('product_id');
$product = \JSFactory::getTable('product');
$product->load($product_id);
$code = $product->getEan();
//</code>
--------------------------------------------------------------
if i use the code like this the product code is at the top of the page
Does not write product code in the product code part of the form
I wrote a script to write it in the form, it didn't work
[29]='product_code';formComponents
<script type="text/javascript">
var c1 = "<?php echo $code; ?>";
document.getElementById("product_code").value = c1;
</script>
//<code>
require_once (JPATH_SITE.'/components/com_jshopping/bootstrap.php');
$product_id = JFactory::getApplication()->input->getInt('product_id');
$product = JSFactory::getTable('product');
$product->load($product_id);
$code = $product->getEan();
echo $code;
//</code>