All Questions
10 questions
3
votes
2
answers
1k
views
How can I add a custom button by using a custom module in Magento 2.3?
I wanted to add my own button in the Shopping Cart as I tried to show you in the screenshot.
But I didn't find a tutorial that worked for me. Do you have any idea how I can do this? (I want to make ...
9
votes
6
answers
2k
views
Magento 2: Changing Price of Product in Controller doesn't work at the moment!
I tried to change the Price of my Products like this:
Controller.php:
[EDIT]
<?php
namespace MassiveArt\ShoppingCart\Controller\Index;
use Magento\Catalog\Model\ProductFactory;
use ...
3
votes
0
answers
175
views
Magento 2: Set custom discount price to existing cart/quote in controller
I would like to set a custom discount price to an existing cart/quote in my controller and found some other people that had this question but none of them got answered:
I want to add discount to ...
2
votes
1
answer
1k
views
Magento 2: Add multiple products to cart programmatically does not work if cart is empty!
I have the same problem as mentioned in this Question: Magento 2: Add multiple products to cart programmatically But it was never answered. This is my Controller.php:
<?php
namespace MassiveArt\...
3
votes
1
answer
2k
views
Magento 2: After adding products to cart programmatically, cart is not refreshing until reloading page
Hello Magento 2 Friends.
I have an ajax call to an controller, which adds some new products to the cart programmatically. This works fine, but the problem is that the cart and the mini cart are only ...
3
votes
6
answers
514
views
Magento 2.3: How can I get the customer ID with PHP?
I am trying to get the items of the cart as well as the customer ID in my Module. But the problem is that I don't know how to get the customer ID properly.
In the Moment I have this Code and it works:...
2
votes
1
answer
1k
views
Magento 2 add custom button next to cart button
I want to add a button next to the cart showed in the screenshot.
Any ideas how to achieve this?
(EDIT) Only need to know what to write in the layout.xml
This is the current XML code
<?xml ...
2
votes
1
answer
798
views
Magento 2 I want to set a custom price of a product programmatically but only for this one session
I have a little problem because I first add some products into the cart -> this is working. But I also need to change the price of this products I add. The problem about that is, that I only want to ...
2
votes
1
answer
63
views
Magento 2.3: I am trying to add text into the small cart, but it's not working
I want to add text into the cart showed in the picture, but unfortunately my code does not work.
This is my file structure:
Code in ButtonGet.php:
<?php
namespace MassiveArt\ShoppingCart\Block;
...
0
votes
2
answers
144
views
is there anything like magento module fallback
we created own theme by extending rwd theme and cart page was using below file code :
app/design/frontend/rwd/theme1/template/checkout/cart/default.phtml
we created custom module and it includes ...