i have a custom module for shipping methods in magento 2

i need to get config product id in the cart list using jquery


<script type="text/javascript">
    //function($) {
      $(document).ready( function() {
        // read checkoutconfig
        var quoteData = checkoutConfig.quoteItemData,
          quote_length = quoteData.length,
          prep_times = [],
          creation_dates = [],
          cake_names = [],
          item_ids = [];

        // Manually prepare this list either by cake name or by item id

        var cakes_prep_time_by_name = {
for(var i = 0; i < quote_length; i++) {
           // quoteData[i].name
           //var prep_time = quoteData[i].prep_time; //assumed

           var order_time = quoteData[i].created_at;

           var cake_name = quoteData[i].name;

           var item_id = quoteData[i].item_id;

           var prep_time = cakes_prep_time_by_name[cake_name];

when i go to check out i need to get all configurable products ids and new custom attribute

any one have idea???

  • share your code where you want this config mean configurable product id ? – Hassan Ali Shahzad Apr 2 at 10:51
  • Added code........................ – prabhakaran7 Apr 2 at 10:56
  • I would suggest to use window.checkoutConfig functionality. I am not sure what you exactly wanted by you may refer this link. magestore.com/magento-2-tutorial/… – Yash Shah Apr 2 at 11:21

You can use.


I hope it's helpful for you.

  • how i can get custom product attribute value in magento 2 – prabhakaran7 Apr 6 at 8:14
  • Can you please give me your url ? – Sweety Masmiya Apr 6 at 8:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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