Magento1.9 - Selected option with explode array exceptionPopulating the multiselect field with available values pre-selected in Admin form edit mode is not workingconfigurable product not allowing add to cart with only custom option selectedexception 'Mage_Core_Exception' with message 'Invalid Block Type: Mage_Bannerslider_Block_Bannerslider'“Please specify the product's option(s).” after magento upgrade 1.6.2 to 1.9.1Create categories through installerHow to make custom option price be added only once undependently on the qty chosen?Prevent saving the default value for category attributeOutput Array with Matching IDsMagento : Configurable product option selectedInsert into goes with empty value and attribute magento1.9Magento1.9 - unknown SQL process

How can I create an article with a title like the 1960s Journal of Finance?

Counting multiples of 3 up to a given number

Is it ethical to tell my teaching assistant that I like him?

Does a hash function have a Upper bound on input length?

You have no, but can try for yes

When will the last unambiguous evidence of mankind disappear?

A Real World Example for Divide and Conquer Method

Can a creature sustain itself by eating its own severed body parts?

She told me that she HAS / HAD a gun

RedirectTo deleting google 360 parameters from URL in Journey builder email sends

1025th term of the given sequence.

Improving an O(N^2) function (all entities iterating over all other entities)

Three phase systems - are there any single phase devices that are connected between two phases instead of between one phase and neutral?

Linux ext4 restore file and directory access rights after bad backup/restore

What is the origin of "Wonder begets wisdom?"

How to tell readers that I know my story is factually incorrect?

Can anyone help me to adjust the following asterisks?

Why should fork() have been designed to return a file descriptor?

What does a Nintendo Game Boy do when turned on without a game cartridge inserted?

Inside Out and Back to Front

Grease/lubricate rubber stabilizer bar bushings?

How does the Gameboy's memory bank switching work?

Why does Plot only sometimes use different colors for each curve

Quickest way to move a line in a text file before another line in a text file?



Magento1.9 - Selected option with explode array exception


Populating the multiselect field with available values pre-selected in Admin form edit mode is not workingconfigurable product not allowing add to cart with only custom option selectedexception 'Mage_Core_Exception' with message 'Invalid Block Type: Mage_Bannerslider_Block_Bannerslider'“Please specify the product's option(s).” after magento upgrade 1.6.2 to 1.9.1Create categories through installerHow to make custom option price be added only once undependently on the qty chosen?Prevent saving the default value for category attributeOutput Array with Matching IDsMagento : Configurable product option selectedInsert into goes with empty value and attribute magento1.9Magento1.9 - unknown SQL process






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















We're having an issue with getting a selected option from our database. It's a custom made plugin, but it contains a few option values, like these:



array(
'value' => 17529,
'label' => Mage::helper('storelocator')->__('Qwic'),
),
array(
'value' => 18789,
'label' => Mage::helper('storelocator')->__('Victoria'),
),
array(
'value' => ('17500,17156,17154,17446,17300,17379,17400,17394,17387,17392,17377,17436,17167,21353,17513,17184,21352,17386,17401,17456,20335,17186,17370,17417,17390,17511,17367,17366,17373,17393,17422,17389,17188,17388,17358,17357,17415,19548'),
'label' => Mage::helper('storelocator')->__('Andere merken'), ),


But now, the bottom option value never stays selected after saving, because the values are being exploded when got from database, like this:



$manuArr = explode(',',$storePU->getManufacture());


How can I make sure the final value is selected? So, make an exception or something in the explode part? I'm not a Magento expert, so I have no clue how to fix this.










share|improve this question
























  • Do you want to select last SKU "19548" to be selected?

    – aravind
    Jul 12 at 10:12












  • The whole final option should be selected, which has all those numbers/SKU's. Is there any possibility to do that, or do they really need to be all seperate?

    – Claudia
    Jul 12 at 10:14











  • did the database stores all those values?you have problem in getting those value?

    – aravind
    Jul 12 at 10:44












  • Yes, that's exactly the thing. They do get stored in the database. The problem is that when opening the page again, the option isn't selected anymore, because PHP explodes it with , (I guess), so it tries to find all the SKU's seperately.

    – Claudia
    Jul 12 at 11:23











  • is it multiselect field ?

    – aravind
    Jul 12 at 11:41

















0















We're having an issue with getting a selected option from our database. It's a custom made plugin, but it contains a few option values, like these:



array(
'value' => 17529,
'label' => Mage::helper('storelocator')->__('Qwic'),
),
array(
'value' => 18789,
'label' => Mage::helper('storelocator')->__('Victoria'),
),
array(
'value' => ('17500,17156,17154,17446,17300,17379,17400,17394,17387,17392,17377,17436,17167,21353,17513,17184,21352,17386,17401,17456,20335,17186,17370,17417,17390,17511,17367,17366,17373,17393,17422,17389,17188,17388,17358,17357,17415,19548'),
'label' => Mage::helper('storelocator')->__('Andere merken'), ),


But now, the bottom option value never stays selected after saving, because the values are being exploded when got from database, like this:



$manuArr = explode(',',$storePU->getManufacture());


How can I make sure the final value is selected? So, make an exception or something in the explode part? I'm not a Magento expert, so I have no clue how to fix this.










share|improve this question
























  • Do you want to select last SKU "19548" to be selected?

    – aravind
    Jul 12 at 10:12












  • The whole final option should be selected, which has all those numbers/SKU's. Is there any possibility to do that, or do they really need to be all seperate?

    – Claudia
    Jul 12 at 10:14











  • did the database stores all those values?you have problem in getting those value?

    – aravind
    Jul 12 at 10:44












  • Yes, that's exactly the thing. They do get stored in the database. The problem is that when opening the page again, the option isn't selected anymore, because PHP explodes it with , (I guess), so it tries to find all the SKU's seperately.

    – Claudia
    Jul 12 at 11:23











  • is it multiselect field ?

    – aravind
    Jul 12 at 11:41













0












0








0








We're having an issue with getting a selected option from our database. It's a custom made plugin, but it contains a few option values, like these:



array(
'value' => 17529,
'label' => Mage::helper('storelocator')->__('Qwic'),
),
array(
'value' => 18789,
'label' => Mage::helper('storelocator')->__('Victoria'),
),
array(
'value' => ('17500,17156,17154,17446,17300,17379,17400,17394,17387,17392,17377,17436,17167,21353,17513,17184,21352,17386,17401,17456,20335,17186,17370,17417,17390,17511,17367,17366,17373,17393,17422,17389,17188,17388,17358,17357,17415,19548'),
'label' => Mage::helper('storelocator')->__('Andere merken'), ),


But now, the bottom option value never stays selected after saving, because the values are being exploded when got from database, like this:



$manuArr = explode(',',$storePU->getManufacture());


How can I make sure the final value is selected? So, make an exception or something in the explode part? I'm not a Magento expert, so I have no clue how to fix this.










share|improve this question
















We're having an issue with getting a selected option from our database. It's a custom made plugin, but it contains a few option values, like these:



array(
'value' => 17529,
'label' => Mage::helper('storelocator')->__('Qwic'),
),
array(
'value' => 18789,
'label' => Mage::helper('storelocator')->__('Victoria'),
),
array(
'value' => ('17500,17156,17154,17446,17300,17379,17400,17394,17387,17392,17377,17436,17167,21353,17513,17184,21352,17386,17401,17456,20335,17186,17370,17417,17390,17511,17367,17366,17373,17393,17422,17389,17188,17388,17358,17357,17415,19548'),
'label' => Mage::helper('storelocator')->__('Andere merken'), ),


But now, the bottom option value never stays selected after saving, because the values are being exploded when got from database, like this:



$manuArr = explode(',',$storePU->getManufacture());


How can I make sure the final value is selected? So, make an exception or something in the explode part? I'm not a Magento expert, so I have no clue how to fix this.







magento-1.9 database custom






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 16 at 7:32









Teja Bhagavan Kollepara

3,0144 gold badges21 silver badges51 bronze badges




3,0144 gold badges21 silver badges51 bronze badges










asked Jul 12 at 10:06









ClaudiaClaudia

61 bronze badge




61 bronze badge












  • Do you want to select last SKU "19548" to be selected?

    – aravind
    Jul 12 at 10:12












  • The whole final option should be selected, which has all those numbers/SKU's. Is there any possibility to do that, or do they really need to be all seperate?

    – Claudia
    Jul 12 at 10:14











  • did the database stores all those values?you have problem in getting those value?

    – aravind
    Jul 12 at 10:44












  • Yes, that's exactly the thing. They do get stored in the database. The problem is that when opening the page again, the option isn't selected anymore, because PHP explodes it with , (I guess), so it tries to find all the SKU's seperately.

    – Claudia
    Jul 12 at 11:23











  • is it multiselect field ?

    – aravind
    Jul 12 at 11:41

















  • Do you want to select last SKU "19548" to be selected?

    – aravind
    Jul 12 at 10:12












  • The whole final option should be selected, which has all those numbers/SKU's. Is there any possibility to do that, or do they really need to be all seperate?

    – Claudia
    Jul 12 at 10:14











  • did the database stores all those values?you have problem in getting those value?

    – aravind
    Jul 12 at 10:44












  • Yes, that's exactly the thing. They do get stored in the database. The problem is that when opening the page again, the option isn't selected anymore, because PHP explodes it with , (I guess), so it tries to find all the SKU's seperately.

    – Claudia
    Jul 12 at 11:23











  • is it multiselect field ?

    – aravind
    Jul 12 at 11:41
















Do you want to select last SKU "19548" to be selected?

– aravind
Jul 12 at 10:12






Do you want to select last SKU "19548" to be selected?

– aravind
Jul 12 at 10:12














The whole final option should be selected, which has all those numbers/SKU's. Is there any possibility to do that, or do they really need to be all seperate?

– Claudia
Jul 12 at 10:14





The whole final option should be selected, which has all those numbers/SKU's. Is there any possibility to do that, or do they really need to be all seperate?

– Claudia
Jul 12 at 10:14













did the database stores all those values?you have problem in getting those value?

– aravind
Jul 12 at 10:44






did the database stores all those values?you have problem in getting those value?

– aravind
Jul 12 at 10:44














Yes, that's exactly the thing. They do get stored in the database. The problem is that when opening the page again, the option isn't selected anymore, because PHP explodes it with , (I guess), so it tries to find all the SKU's seperately.

– Claudia
Jul 12 at 11:23





Yes, that's exactly the thing. They do get stored in the database. The problem is that when opening the page again, the option isn't selected anymore, because PHP explodes it with , (I guess), so it tries to find all the SKU's seperately.

– Claudia
Jul 12 at 11:23













is it multiselect field ?

– aravind
Jul 12 at 11:41





is it multiselect field ?

– aravind
Jul 12 at 11:41










0






active

oldest

votes














Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f281870%2fmagento1-9-selected-option-with-explode-array-exception%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f281870%2fmagento1-9-selected-option-with-explode-array-exception%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?