9

First Go to Admin panel, Click on Stores -> Attributes -> Product from left side menu. Click on Attribute you want to display inside details page. Now click on Storefront Properties tab from left sidebar, Set Yes on Visible on Catalog Pages on Storefront. Details tab display description of product, which is set from admin product. Now your value ...


4

You can change the order of attributes in frontend by changing the order that they appear on your attribute set.


4

you can use sales_order_invoice_save_after(if you want to be sure the order is paid) or checkout_onepage_controller_success_action (after order success ) config.xml <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd"> <event name="sales_order_invoice_save_after"&...


3

You can add Additional Information section in by adding below code of line in your app\design\frontend\default\theme327k\template\catalog\product\view.phtml after the short description section. echo $this->getLayout()->createBlock('catalog/product_view_attributes')->setTemplate('catalog/product/view/attributes.phtml')->toHtml(); Hope it helps!!!...


3

The following code works. http://i.prntscr.com/cFUE8nuRQC2Veg4i3xo9OQ.png $additionalOptions['print_style'] = [ 'label' => 'Print Style', 'value' => 'Test', ]; $params = array( 'product' => 4, 'qty' => 1, ); $_product = $this->...


2

$info will hold an instance of Mage_Payment_Model_Info or Mage_Sales_Model_Order_Payment (which extends Mage_Payment_Model_Info) The creation date that you want to get is the creation date of the actual sales order, but you are trying to get it from the info model. If you would call $info->getOrder()->getCreatedAt() then that should work.


2

I think this an interesting topic. At the end of the day, no matter how initFromOrder is being called, it is still necessary to add a new payment method to a reorder or editorder. It is really important to distinguish the difference between the payment data on the quote and on the order objects. It is the order object that ultimately executes place() which ...


2

I found that Magento rounds if an attribute value is numeric, to fix this for SKU I did the following: In app/design/frontend/YOURTHEME/YOURTHEME/template/catalog/product/view/attributes.phtml Change <?php $_MyValue = $_data['value']; if (is_numeric($_MyValue)) { $_MyValue = round($_MyValue, 2); //round to 0.00 } ?> To: <?php $...


2

Posting the answer here in case someone else bumps in to the same issue. Magento order object already returns the additional_information as an array, so we just needed to add a typens <element name="additional_information" type="typens:salesOrderPaymentAdditionalInformationEntity" minOccurs="0" /> and then parse out the line items - I did it for 3 ...


2

In order to show a custom input field after selecting your custom shipping method, you have to add a js block subscribing to select method event: Add a custom phtml to layout checkout_index_index.xml Then add the next block to your phtml: <script type="text/javascript"> require([ 'jquery', 'Magento_Checkout/js/model/quote', ],...


2

I managed to figure this out (albeit using reviews as a source of inspiration). This has been tested and is working on Magento 2.3.3 Namespace/Module/etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <type name="...


1

For add field in shipping adress section, override vendor/magento/module-checkout/view/frontend/web/template/shipping-address/address-renderer/default.html For override create requirejs-config.js at app/code/Vendor/Module/view/frontend/requirejs-config.js var config = { map: { '*': { 'Magento_Checkout/template/shipping-address/...


1

Use json_encode instead serialize public function execute(EventObserver $observer) { $additionalOptions = array(); if ($additionalOption = $item->getOptionByCode('additional_options')) { $additionalOptions = (array) unserialize($additionalOption->getValue()); } $additionalOptions[] = [ 'label' => 'helllo', '...


1

@codingStandardsIgnoreFile = Ignore the whole file when testing the coding standards. @codeCoverageIgnore = Ignore the file when testing the code coverage. @codingStandardsIgnoreStart = Ignore the code below this when testing coding standards. @codingStandardsIgnoreEnd = Used after @codingStandardsIgnoreStart to begin checking the code again. As for why ...


1

check out https://magecomp.com/blog/add-additional-options-magento-2/, you must add an observer to actually add the custom option to the order


1

You may use 2 approaches here 1) You may use setOptions() method to set the custom options before adding product to cart Your approach will be like $customOptionFactory = $objectManager->create('Magento\Catalog\Api\Data\ProductCustomOptionInterfaceFactory'); $additionalOptions['print_style'] = [ 'label' => 'Print Style', 'value' =>...


1

You need to use Observer checkout_cart_product_add_after to add custom data in additional_options Here is full Example


1

Edit your app\design\frontend\YOUR_PACKAGE\YOUR_THEME\template\catalog\product\view\addtocart.phtml put below code after your Add to Cart button tag completes. <div class="add-to-cart-buttons"> <button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><...


1

You can use this code to get orders items in observer: Magento 2 $orderId = ''; $order = $this->_objectManager->create('Magento\Sales\Model\Order')->load($orderId); $orderItems = $order->getAllItems(); foreach( $orderItems as $item ): $productId = $item->getProductId(); /* Here we can get additional data */ endforeach; } Magento 1....


1

To do this you first need to create a new module. Add this block class to your module: /app/code/Your/Module/Block/Product/View/Attributes.php <?php namespace Your\Module\Block\Product\View; use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Framework\Pricing\PriceCurrencyInterface; class Attributes extends \Magento\Catalog\Block\...


1

In product attribute option there is one option available Visible on Catalog Pages on Storefront . If you set this option to yes then its value value will be display on product detail page under more information tab.


1

Go to the attribute which you want to show on Front end. In admin Stores>Attributes>Product There is tab Storefront Properties have drop-down "Visible on Product View Page on Front-end" set it yes. you should be able to see new attribute vale on Front-end.


1

@Mike First tab is for Details and it comes from Description in product add/edit page from admin And More info are related to product attribute which has visibility to Yes for Visible on Catalog Pages on Storefront front end which attribute has assign to current product you can refer link to add attribute in magento2 here Hope this will work for you ...


1

Best way is create new field for the id because your use this field anywhere and also convert to sales_flat_order_item table easily.


1

You need to get the individual object from the collection Try $collection = Mage::getModel('sales/order_payment_transaction') ->getCollection() ->addAttributeToFilter('order_id', array('eq' => $payment->getOrder()->getEntityId())) ->addAttributeToFilter('...


1

You could customize the template catalog/product/view/attributes.phtml. Copy it to your theme from base/default if it isn't there yet and include what you need. For better maintainability, I'd recommend to just add $this->getChildHtml('my_child_alias') to the template and define child blocks in the layout (i.e. layout/local.xml of your theme: <...


1

Its really hard to debug your issue without having access to source files. However this suggestion might help you. First check which design package is been being used from here System -> Configuration -> Design -> Package. Then go to the package folder under app/design/frontend/package_name/default/template and copy review folder if exist. Then ...


1

Using your existing code. You just need to change this, $_product = $this->getProduct() To $_product = Mage::getModel('catalog/product')->load(100) Replace 100 with your product ID.


1

I found the problem. There is an extension on the our Magento Instalation called amasty color swatches which has a script on the page which disables the additional info tab. here it is: <script type="text/javascript"> var amConfAutoSelectAttribute = 1; confData = new AmConfigurableData({"9":{"...


1

We encountered this problem before and found that creating a list with a comma or better a pipe (|) separating each item. When you go to display your info on the frontend you can explode the list and format it anyway you want.


Only top voted, non community-wiki answers of a minimum length are eligible