Questions tagged [sales-quote]

Denotes questions related to the sales quote on Magento (creation, management, modification, relations)

10
votes
0answers
258 views

Is there an event or plugin spot for when cart rule is no longer valid?

Is there an event or place I can plugin for when a shopping cart price rule is no longer valid (such as when it expires or if you change the quantity of other products where it no longer applies)? I ...
8
votes
3answers
125 views

Getting Value of product attribute on cart page even not assigned to that particular product Magento 2

I am getting the product attribute from quote. It seems there is wrong value comes. Please check my below code. $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $cart = $...
4
votes
2answers
3k views

When Quote id generated in magento?

When Quote id generated in magento? Is it generated: when customer got registered or when customer adds product to cart. I have gone through many article but there is no clearance on it.
3
votes
1answer
486 views

Why is there a base_row_total variable in Quote and Order models?

I'm trying to understand the purpose of base_row_total property in Quote and Order sales models. I still haven't found an example in which it's different from row_total. Can anyone clarify ? I think ...
3
votes
2answers
3k views

I want to set custom price programmatically to the product Magento 2

I want to set the custom price for the product programmatically.In my current code , the customer create programmatically and set the products to the newly created customer.But i want set all product ...
3
votes
1answer
3k views

Get Quote ID from an Order ID or Order Number SQL?

I need to query the Magento MySQL database to get an image path/name for a file. What I have: Order ID Order Number What I need: I need to get the image name/path from this table ...
3
votes
1answer
1k views

Get quotes (active and inactive) for a customer

The goal is to get all the quotes for a given customer (considering id, email, whatever). But this quotes collection seems to work differently from those of customers and products. First attempt: ...
2
votes
2answers
424 views

How to add quote Item id as new field?

I have a new field varient_id in sales_flat_quote_item and sales_flat_order_item table. I want to save item_id as varient_id in sales_flat_quote_item and sales_flat_order_item table. ie,quote ...
2
votes
1answer
1k views

Get quote data(Shipping zip code) from observer magento 2

I created a observer and i need to fetch the zip code of current quote, Below code is for my event.xml <event name="sales_quote_collect_totals_before"> <observer name="...
2
votes
2answers
1k views

Magento2 Split Order Based on Vendor

I am trying to split the order based on vendor during checkout process. If there are two products in cart from different vendor, order needs to be split based on vendor. I have followed the answer ...
2
votes
1answer
86 views

delete an order once it is converted back to a quote in EE 1.14.0.1

I have a Magento EE 1.14.0.1 and am working on a custom paypal type payment processor. I have it all working with the exception of if once a customer gets to the external payment processors page and ...
2
votes
0answers
30 views

How to correctly add an extra charge to a Magento 2 order's total amount?

We're using a custom module to calculate an amount we need to include in the grand total of the order, i.e. the customer will be charged for the product PLUS this custom amount. The result is our ...
2
votes
0answers
375 views

Create quote with product options programmatically

i created a product with customizable options like this: and i've successfully create a quote like this: $store = $this->storeManager->getStore(); $websiteId = $this->storeManager->...
2
votes
0answers
257 views

Why some order id are skipping from admin panel Sales > Order [duplicate]

Why this number jumps from 189 to 191 ? When i found this issue there were many missing order number. Even i got solution that some order with status : pending or hold cant be seen in the admin ...
1
vote
5answers
2k views

convert quote to order for guest users

Hi I am converting a quote to order programatically. 929 is a quote id of a guest user.When i am trying a actual customers quote id it is working fine.but for guest this is not working. giving error ...
1
vote
2answers
1k views

Create Duplicate quote item instead of updating existing quote item for same product

Requirement-- I have created a custom Purchase Order module for my Magento Store, in which a same product may be supplied from many suppliers. You will be fully cleared from below example- (1) A ...
1
vote
2answers
4k views

Programmatically assign customer to a quote

I have created a custom api for login and addtocart operations. When the user is not logged in and add products to a cart that quote id is saved and when a user logged in using the my api then i want ...
1
vote
2answers
2k views

Update “sales_flat_order_item” table when making an order

I have created a custom product attribute that needs to be inserted into sales_flat_order_item (there's a custom column already created) everytime an order is placed. Config.xml for the observer event:...
1
vote
2answers
489 views

get cart items from custom column value

I have a custom column in my sales_flat_quote_item table named as device_id. I am working on to create a api where a device id is sent and the cart available items are displayed for guest users. $...
1
vote
1answer
5k views

How to change product name in quote item dynamically

Is it possible to add several the same product times to the cart with a different name? I did with different price, but I have not managed to do it with a different name. I used an observer "...
1
vote
1answer
523 views

Get Payment details in QuoteManagement.php

I have extended QuoteManagement.php file for split order. It's working fine, but I need payment details like credit card details to process the order. But I am not able to get payment details in file ...
1
vote
1answer
315 views

Which tables are affected in Magento 1.9 when I empty the cart?

I am working with a Magento 1.9. I had added some products (Simple products) to my cart as a logged in user and saved it for checkout it later. But I haven't placed it as an order. I empty that cart. ...
1
vote
1answer
1k views

Magento 2 saving custom attribute to sales_order_items

I have a custom attribute of a product, that I want to have it's value stored in sales_order_items. I have added an extra column in the table sales_order_items. But How can I store the value of that ...
1
vote
1answer
913 views

How to add new input field in cart page in magento2?

In Magento2, I want to add/show custom input field in checkout page and save it to my custom field from Sales_order and Quote table in database.
1
vote
1answer
627 views

Event for Sales Order Quote Item

Question is about Magento 1.8 While creating order in the admin panel -> Sales -> Orders -> Create New Order When I add products, I can change the price to "Custom Price" and Update Items as below; ...
1
vote
1answer
367 views

Create an order from an existing order

I have seen lot of posts, but didn't get proper answer to create new order from an existing orders at magento. Concept is create an order from an existing orders by copying all elements/object from ...
1
vote
1answer
216 views

Magento 1: when is the email added to the quote?

I noticed something interesting today. I was working on a module that deals with the sales_flat_quote table. I'm using this table to notify abandoned carts. However, one of the email in this table ...
1
vote
1answer
1k views

Event to track quote changes in magento

I want an observer to track changes in Quote like when removing products, updating, adding product from frontend and backend as well. This observer should run after magento native code. There are ...
1
vote
1answer
309 views

Find quote creation code in magento (sales_flat_quote creation)

Where can i find the code for creating a quote while adding product to cart?
1
vote
1answer
840 views

Magento programatically convert quote to order - orders missing in backend

I'm dealing with a strange issue with orders placed with PayPal (most likely IPN problems) as a payment method and I have about 10 orders that are not showing in Magento Admin backend under Sales -> ...
1
vote
1answer
2k views

adding custom code to function addItem in Quote.php

I looked for a way to add a custom order item. Code -> Core -> Mage -> Sales -> Model -> Quote.php See: public function addItem(Mage_Sales_Model_Quote_Item $item) { // Added: $...
1
vote
0answers
13 views

Magento 1.9 moving products between websites

How to move a product/item who was added to cart/quote on websiteA to cart/quote which is on websiteB. I would like to solve this problem with controller, but I am not very successfull. Do you ...
1
vote
1answer
22 views

How can I get customer_taxvat on sales flat quote in - Magento 1

public function loadAttributeOptions() { $customerAttributes = Mage::getResourceSingleton('customer/customer')->loadAllAttributes()->getAttributesByCode(); $attributes = array(); ...
1
vote
0answers
19 views

Magento 2 : Send email of unused quote information to store admin with separate module

If customer not generated any order while fill checkout form and not created any order for few hours like 6 hours , so store admin getting email and get details of that customer.
1
vote
0answers
54 views

No customer_id in sales_flat_quote but forced login? [closed]

In our shop there are records in the table sales_flat_quote where the customer_id is NULL. If I understand correctly this is due to a customer not being logged in. The catch is that our shop has ...
1
vote
1answer
345 views

Tracing missing order numbers in the database, possibly even before they are “reserved”

Hoping for someone to chime in who extensively knows the Magento database architecture inside out. Missing order numbers. Example, in Magento, order number increments like: 100002410 100002411 ...
1
vote
1answer
1k views

How to save order comment programmatically in magento2?

1)I'm creating custom order comment text box in sales->order->create new order . 2) Created order_comment column in sales_ order grid/quote. 3) I need to save order comment text box value into db....
1
vote
0answers
38 views

How to change Submit Order button on Magento 2

How can I change the "Submit Order" button on new order view? I tried changing Magento_Sales::order/create/totals.phtml Text get changes, but the page does not refresh on adding or deleting a ...
1
vote
0answers
126 views

Magento 2: How do I join sales_order_grid table to sales_order_item table?

select * from sales_order_item t1 inner join quote_item t2 on t1.quote_item_id=t2.item_id inner join sales_order_grid t3 on t1.order_id=t3.entity_id I am trying to pull a report along with each ...
1
vote
1answer
1k views

How to save quote billing address in magento 2?

For our project we have customized theme in Magento2. This has billing and shipping address pages. We have to save the billing address details in quote address table. But we didn't come across any ...
0
votes
2answers
1k views

Change registered customer biliing email address on the time of checkout

I am trying to implement one functionality where logged in user can able to change the billing email address on the time of checkout. I have tried to do that but all the time it updates customer ...
0
votes
1answer
42 views

Show value of all totals in controller action

I need to log the values of all totals from a controller action. If the controller action is called, then i need a list rendered which shows the totals: If you are not familiar with totals then look ...
0
votes
1answer
2k views

save custom field from sales_flat_order_item to sales_flat_order

I have created a set of custom variable in my sales_flat_quote_item and sales_flat_order_item and saved custom field values into sales_flat_quote_item using the observer <...
0
votes
1answer
129 views

Magento 1: Check if customer has quote

How can I filter customers by the fact if they have a quote in the sales_flat_quote table? I could foreach every customer to check if their email address is located in the sales_flat_quote table, but ...
0
votes
2answers
194 views

Magento model not fetching data

I am using magento 1.9. I want to retrieve data from sales_flat_quote_address table in onepagecheckout, after saved the shipping method. I have used the following codes. But no result. Code 1: $...
0
votes
3answers
5k views

Remove item from Quote item - Magento1.9

Hi I was trying to remove an item from the sales quote item. $quoteItemCollection = Mage::getModel('sales/quote_item')->getCollection()->addFieldToFilter('quote_id', $quoteId)->...
0
votes
1answer
660 views

Magento 1.9 Not able to create quote item

I have the following function inside my model.This checks for the device id(custom column in sales quote) in database and if found and the qoute item has same product id then just updates the qty or ...
0
votes
2answers
5k views

get product id from quote id - Magento 1.9

Hi need toget the product id of in a quote item.i have the qoute id with me and tried the below code but product id does not seem to display from the quote. $quoteId=784; $quote = Mage::getModel('...
0
votes
1answer
22 views

When add second product, custom attributes not save data. Using event “ sales_quote_item_set_product ” in Magento 2

I used the sales_quote_item_set_product event to save data to the table when adding to cart product. It works but when I add the next product, it does not save the old data in the old field. My ...
0
votes
0answers
19 views

Magento 2 customer is saved as guest even if he logged-in in quote table

We have an issue that if a customer is logged-in and add product to cart, in quote table we have a column as customer_is_guest, it is saving as 1, even if the customer is logged-in, it is showing as ...