Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7183307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:57:10+00:00 2026-05-28T17:57:10+00:00

I’ve been reading a lot of tutorials around the internet, but even the ones

  • 0

I’ve been reading a lot of tutorials around the internet, but even the ones on the Magento site are for version 1.5 or less and even some of the functions references do not exist any longer.

What I am doing is simple, I am sending a item to a custom script outside of Magento where the user makes a design and then the customer can click Add to Cart from there and its added back to Magento.

What I need is have the designed image file names be a line item-specific piece of data that is displayed in the order process and the view order history for both client and administration.

I have a module that hooks into checkout_cart_product_add_after and is able to get the following information: designs and designId. designId is used in the event the user goes back to edit the design, so the design is re-loaded and then when the item is passed back, the designs and designId contents should be replaced if different.

At the moment, I am adding the product to the cart via URL because examples on how to add it pragmatically worked to a certain extent, but ultimately fail to save to the cart. Difference between the STORE_ID and some random glitch in the Magento code, I assume.

I appreciate pointers to more solid information than just plowing through old documentation to see if there is anything useful to get out of it, it has gotten me this far but its not an effective method of getting things done properly.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T17:57:11+00:00Added an answer on May 28, 2026 at 5:57 pm

    There are a lot of things to consider with this approach, and several ways that you can do it. If anything it’s far from simple.

    A) Firstly, see if this can be achieved with existing product custom options. If there’s any way you can do it without having to change a whole lot of core functionality it’ll make your life easier down the track.

    B) Personally, I would consider creating a model for your custom content and a relationship between that content and sales/quote_item and sales/order_item. You’ll need to modify the front end to bring this in, and also the admin area to display the info, and give administrators a means to add the custom content to items. This is probably the most thorough way you can do it.

    C) Alternatively, you can add an array of custom data to the quote when the item is added to quote. For this, you’ll have to hijack the add-to-cart controller completely. To start with, take all the functionality from the existing controller. Look at the Mage_Sales_Model_Quote::addProduct() function and you’ll see that it takes two parameters like so:

    $quote->addProduct($product, $request);
    

    where $request is of type Varien_Object formatted like this:

    $request = new Varien_Object(array(
        'qty'=>$qty,
        'options'=>$options,
        'custom_options'=>$custom_options
    ));
    

    and where $custom_options is an array of custom data.

    This way can be useful, but is fraught with danger. You need to ensure that you duplicate all of the functionality of the original add-to-cart controller, including dispatching the event and setting all session flags. There are also other considerations. If your data is line item specific, then we can safely assume that you don’t want Magento simply incrementing the quantity of the line item in the cart, as the specific data applies to a specific line item. To do this, you would override Mage_Sales_Model_Quote, and duplicate the getItemByProduct() function to run a different set of checks on the line item to determine whether or not to increment the qty.

    If you can’t do A, B is my recommended approach. It is probably more time consuming in the short-term but a better solution long-term.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
This could be a duplicate question, but I have no idea what search terms
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
I have been unable to fix a problem with Java Unicode and encoding. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.