i created custom model(e.g. 'Sample' model) and create one table(fields are like name,price,description) and their fields value store in form input type so i want to add their data in cart so how can i achieve this functionality ?

1 Answer 1


I'm assuming you mean that you're trying to load a model:


And then write some/all of its data to the checkout session model:


This will effectively write a value to $_SESSION['checkout']['sample_description'] and remain for the duration of this particular session's lifetime.

Now you can access this value:


See this answer for a deeper explanation about working with sessions in Magento: https://stackoverflow.com/a/9805663/1442685

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.