New answers tagged

0

You have quote, so you can easily get the product. Try the following way: if ($quote) { foreach ($quote->getAllItems() as $item) { $product = $item->getProduct(); error_log($product->getSku()); } } Note: use your custom attribute instead of sku


0

So the solution was simple, To make getFinalSale function run every time data of price/discount changes Use totals: quote.getTotals() return Component.extend({ defaults: { template: 'Magento_Checkout/summary/item/details' }, quoteItemData: quoteItemData, finalSaleData: finalSaleData, saleData: saleData, totals: quote....


0

As far as I'm aware they've created only one view table If you use mysqldump you end up with this CREATE ALGORITHM=UNDEFINED DEFINER=`dbusername`@`localhost` SQL SECURITY INVOKER VIEW `inventory_stock_1` AS select distinct `legacy_stock_status`.`product_id` AS `product_id`,`legacy_stock_status`.`website_id` AS `website_id`,`legacy_stock_status`.`stock_id`...


1

$address->getCustomerAddressId() can return null and $addressObject left null. You can try this: $addressObject = null; $customerSession = $objectManager->get('Magento\Customer\Model\Session'); $customerRepository = $objectManager->create('\Magento\Customer\Api\CustomerRepositoryInterface'); $customer = $customerRepository->getById(...


0

You can change the order of your totals in the configuration section of the store. Navigate to: Admin -> Stores -> Settings -> Configuration -> Sales -> Sales -> Checkout Totals Sort Order In this section you can reorganise the order of your totals.


0

It depends how the template is being overridden, usually either a new template is specified in layout XML or a template is placed in the same path as the original but in the custom theme. If you delete the template in your custom theme and re-deploy the core template should be used again. We need a bit more info to help in more depth though: What version ...


0

After migrating the site I got the above error on placing the order. The user that was trying to access the DB is an old server DB user which didn't exist in the new server. I searched for the user in DB and Code to make sure something wasn't hard coded and nothing was hardcoded. Finally, after googling a bit I found a solution : Problem: Magento ...


0

You donot need defining the variable protected $_logger;$_logger etc as it already exists at extended class. <?php namespace Vendor\RedExpress\Model\Carrier; use Magento\Shipping\Model\Carrier\AbstractCarrier; use Magento\Shipping\Model\Carrier\CarrierInterface; class Redexpress extends AbstractCarrier implements CarrierInterface { protected $...


0

In your constructor PHP Doc you have the curl missing. Try this : /** * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory * @param \Psr\Log\LoggerInterface $logger * @param \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory * @param \...


0

The problem has been solved. It turned out that the problem was due to an extension that I was using. Specifically, Magestore_StorePickup After disabling it, the problem went away.


0

You can remove this UI component via layout using componentDisabled property. Add this to your checkout_index_index.xml file: <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <...


0

I am facing similar issue and did not able to solve it. I guess you can try to update the address renderer's data:elems. update and data: elems in shipping-address/list.html I am not able to understand it. If you solved, you may post your updated code here. The link you try is not working because the address is not saving to quote at that step. Guessing it ...


0

Please check with below url. Its demo for windows.checkoutConfig.items https://www.webnexs.com/blog/kb/include-variable-window-checkout-config-magento-checkout/ https://webkul.com/blog/update-cart-totals-by-js-on-checkout-page-magento2/ I hope its helpful to you.


1

This Message Appear On This 2 File :- vendor/magento/module-checkout/view/frontend/web/template/minicart/content.html vendor/magento/module-checkout/view/frontend/web/template/summary/cart-items.html In content.html Line no. 33 to 38 <!-- ko if: (getCartLineItemsCount() === 1) --> <span translate="'Item in Cart'"/> <!--/ko--...


0

Please try with below url : https://www.ibnab.com/en/blog/magento-2/save-payment-method-with-additional-data-show-custom-field-on-payment-check and find below text in this url 'Ibnab/Additional/Observer/SaveBankInfoToOrderObserver.php' which is store data in database. I hope its work for you.


0

I had the same problem which happened after Auth.net phased out MD5 based transHash in favor of SHA-512. To fix, I replaced these two files - /public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php /public_html/vendor/magento/module-authorizenet/Model/Directpost/Request.php with the following files https://gist.github.com/onamfc/...


0

This for list page : Vendor/Module/view/frontend/requirejs-config.js var config = { config: { mixins: { 'Magento_Catalog/js/price-box': { 'Vendor_Module/js/price-box-mixin': true } } } }; var/www/html/olystudio/vendor/magento/module-catalog/view/base/web/js/price-box.js define(['jquery'], function ($) { return function (...


0

Please try to override Magento/Catalog/view/base/templates/product/price/amount/default.phtml from core vendor to your theme path and added the text in the above or after rendering price.


5

First of all, we need to understand how the Magento Gift Message works on Cart Page. vendor/magento/module-gift-message/view/frontend/templates/cart/gift_options.phtml This file is our light. We will save a lot of time if we understand its logic. window.giftOptionsConfig: this global variable used for config. We should recreate it on checkout. Let's ...


1

Try below code <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="checkout" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceContainer name="content"> <block class="Magento\GiftMessage\Block\Cart\GiftOptions" name="checkout....


-1

You need to add foreign key constraint for quote_id and customer_prescription_id Refer this link https://devdocs.magento.com/guides/v2.3/extension-dev-guide/declarative-schema/db-schema.html <constraint xsi:type="foreign" referenceId="FL_ALLOWED_SEVERITIES" table="declarative_table" column="severity" referenceTable="severities" referenceColumn="...


0

First thing your class should start with Capital letter By following code you can redirect to success page $resultRedirect = $this->resultRedirectFactory->create(); $resultRedirect->setPath('checkout/onepage/successs'); return $resultRedirect; Hope it helps.


0

I recommend that you use an extension There is a lot out there but this will do the job and as time of answer is only 99 dollars https://bsscommerce.com/magento-2-checkout-custom-field-extension.html You will spend a lot more time and money trying to customise the checkout yourself. It is painful to do in m1 and it is painful to do in m2.


1

you have to select default config in store view selection at the top left of the page please see the screenshot


1

Make this fields blank Hope it works!!


0

Step 1: Create File: Adamsmage/Checkoutattribute/Setup/InstallData.php <?php namespace Adamsmage\Checkoutattribute\Setup; use Magento\Framework\Setup\InstallDataInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\ModuleDataSetupInterface; use Magento\Customer\Model\Customer; use Magento\Customer\Setup\...


0

for the solution, follow below steps to create module for Custom Value show in Summary block Step1 : app/code/Adamsmage/Customopt/etc/catalog_attributes.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Catalog:etc/catalog_attributes.xsd"> ...


0

Find that line in the project with grep -Ril "your text" command and comment that for hiding the error on top for a quick solution or rewrite that file in your custom module and delete that line.


0

So it turns out the issue is setting based and not an error with the code. Apparently, there is only a single global setting for the authorize.net credentials. In the payment methods for auth.net you have to select the option (Use Default) for each credential you enter (public client key, signature key, etc...). If you are hosting multiple sites from a ...


0

If you are using sagepay suite use the "form" or "server" methods, you should be fine (as long as you have 3d Secure turned on), but if you are using direct changes are needed ( 9 addional feilds need to be past). More info here If you are using "direct" then sagepay suite needs to be updated. Ebizmarts ( the creators of the sagepay suite extension) are ...


0

Following is query to create amazon_sales_order SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; CREATE TABLE `amazon_sales_order` ( `entity_id` int(10) UNSIGNED NOT NULL COMMENT 'Entity ID', `order_id` int(10) UNSIGNED NOT NULL COMMENT 'Order ID', `amazon_order_reference_id` varchar(255) NOT NULL COMMENT 'Amazon ...


0

You should activate Include Tax In Order Total Below is the step: Admin -> Stores -> Configuratuion -> Sales -> Tax -> Shopping Cart Display Settings -> Include Tax In Order Total Make it Yes php bin/magento indexer:reindex php bin/magento cache:clean


1

Store >> Configuration Sales >> TAX Shopping Cart Display Setting >> Display subtotal set as "Excluding Tax"


5

You can use an action like this: require( [ 'Magento_Checkout/js/model/cart/cache', 'Magento_Checkout/js/model/cart/totals-processor/default', 'Magento_Checkout/js/model/quote' ], function (cartCache, totalsProcessor, quote) { cartCache.clear('cartVersion'); totalsProcessor.estimateTotals(quote....


0

To find out the issue Put your site into developer mode php bin/magento deploy:mode:set developer php bin/magento setup:upgrade php bin/magento setup:static-content:deploy -f php bin/magento cache:clean And load again.


1

You can do it by following Steps below: Step 1: Create new template for shipping method item In your custom module directory, create a new file: <your_module_dir>/view/frontend/web/template/custom-method-item-template.html. In this file, add the following code. It is copied from the <Magento_Checkout_module_dir>/view/frontend/web/...


0

You can remove Method Name from the admin configuration like this. And you can see the result now on the front page. The title is removed.


0

to force HTTPS, change your base url to https://. bin/magento setup:store-config:set --base-url="https://muzikhausberlin.de/" bin/magento setup:store-config:set --base-url-secure="https://muzikhausberlin.de/" bin/magento setup:store-config:set --use-secure=1 bin/magento setup:store-config:set --use-secure-admin=1 bin/magento cache:flush also if you have ...


1

You can check cart-items.html from the path below: vendor/magento/module-checkout/view/frontend/web/template/summary/cart-items.html Look for the openedState attribute and change the active state to false.


1

Please do refer following steps to add new custom field under shipping address on checkout Page, https://webkul.com/blog/add-custom-field-checkout-address-form-magento2/


0

Observers are used, when you want to do something with the data of cart , but for your requirement you need work with js , html and phtml. For example if you want to open a popup on click of minicart on the sidebar Proceed To checkout button then override /vendor/magento/module-checkout/view/frontend/web/js/sidebar.js and then change this events['...


3

Ensure that you have defined terms in Magento under Sales > Terms and conditions Ensure that you have terms enabled in System Configuration > Sales > Checkout > Checkout Options > Enable Terms and Conditions If already enabled from above then you need to check it in codebase, follow this in case of code edit Terms and condition on checkout page


0

Please try with below event, which is working with before checkout page. controller_action_predispatch_checkout_index_index


0

Unfortunately for me @steros answer didn't provide a useful solution. I found in this stack overflow question another XML example and it worked so I'm adding it here for reference. The item name="telephone" element need to look like this <item name="telephone" xsi:type="array"> <item name="config" xsi:type="array"> <item name="...


0

In newer versions you can use the API: public function __construct(\Magento\Checkout\Model\Cart\CartInterface $cart) { $this->cart = $cart; }


0

I'm facing the same issue on the checkout page while upgrading from 2.2.4 to 2.3.1, and I replace core_config_data table with magento 2.2.4 , now it is working perfectly.


0

Please check this file in your theme: Magento_Checkout/web/template/shipping-information/address-renderer/default.html City Should be remove from there, if yes then please add below code:- <!-- ko text: address().city --><!-- /ko --> Then File should be look like this:- <div class="shipping-address-item" data-bind="css: isSelected() ? '...


0

Please Can U folllow this Link, it is proper solution of create terms and conditions popup in checkout page Checkout Poupup link


1

For the guest user, the tax will be calculated and shown in the checkout section after filling the shipping address form in the checkout page. Because Magento by default tax gets calculated based on the zipcode from the shipping address.


0

A firewall is not letting Sage Pay POST information to Magento Incorrect URLs for payment success or failure in payment request can cause this issue too. Basically what's happening is that sagepay is contacting the website and not getting a response in the expected format. This is after the payment panel or screen has shown and the transaction is ...


Top 50 recent answers are included