6

I have created a custom magento extension that lists the products in the same way as 'Manage Products' but with an extra input column where people can enter a quantity for each row which is then used to generate a CSV file.

I have got this to work but I have seen an issue where you can select some products and change page and the products are still selected but the quantity that the user has entered is lost. How can I save the quantity added to the new custom input fields with the selected products.

I am assuming that something is used in grid.js to save the details but I haven't been able to find the correct function.

Anyone have any ideas?

asked Nov 22, 2015 at 15:37
2
  • 3
    magebase.com/magento-tutorials/… Commented Nov 22, 2015 at 21:25
  • Did you get it? Maybe you can post your extension grid class to have a look? Commented Jan 15, 2016 at 16:05

2 Answers 2

0

I just wanted to update this thread, as both links which are very useful, and would be very relevant to OpenMage, have expired. Here are the archive links:

answered Sep 20, 2024 at 5:23
0

This excellencemagentoblog.com (updated to archive link) article is a good place to learn about Grid Serializer

Pay attention to this piece of code

<test_adminhtml_test_customer>
 <block type="core/text_list" name="root" output="toHtml">
 <block type="test/adminhtml_test_edit_tab_grid" name="customer.grid"/>
 <block type="adminhtml/widget_grid_serializer" name="grid_serializer">
 <reference name="grid_serializer">
 <action method="initSerializerBlock">
 <grid_block_name>customer.grid</grid_block_name>
 <data_callback>getSelectedCustomers</data_callback>
 <hidden_input_name>links[customers]</hidden_input_name>
 <reload_param_name>customers</reload_param_name>
 </action>
 <action method="addColumnInputName">
 <input_name>position</input_name>
 </action> 
 </reference>
 </block>
 </block>
</test_adminhtml_test_customer>

This <input_name>position</input_name> is the name of your custom column

answered Apr 7, 2016 at 3:37

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.