Configurable Product Dropdown Image SwitchConfigurable products: product image not updating after selecting attribute in dropdownFatal Error Mediafallback.php on line 61How to correctly create a configurable product with multiple attributes and imagesHow to display Configurable/Color Swatches in Homepage Magento 1.9.1Magento - Fatal Error in Mediafallback.php - 1.9.2.4Configurable product image resolution issueIssue while Configuring color swatches in Magento 1.9.3.10How to show dropdown configurable attribute in Product Category View in Magento 2?Fatal error: Uncaught Error: Call to a member function getId() on null inProductimg.php errorlog in system.logMagento 1 EE 1.14.3.10 - Mage::getSingleton('core/resource')->getConnection('core_read') is returning null sometimes
Is it ok to include an epilogue dedicated to colleagues who passed away in the end of the manuscript?
Replacing Windows 7 security updates with anti-virus?
Force user to remove USB token
Is "history" a male-biased word ("his+story")?
Potentiometer like component
How is the Swiss post e-voting system supposed to work, and how was it wrong?
US to Europe trip with Canada layover- is 52 minutes enough?
Good allowance savings plan?
What is the probability somebody's birthday is the day before mine?
How could our ancestors have domesticated a solitary predator?
How to deal with a cynical class?
Can the druid cantrip Thorn Whip really defeat a water weird this easily?
Is a lawful good "antagonist" effective?
Does the Bracer of Flying Daggers benefit from the Dueling Fighting style?
Too much vertical space above xrightarrow
Plywood subfloor won't screw down in a trailer home
How does airport security verify that you can carry a battery bank over 100 Wh?
What exactly is the purpose of connection links straped between the rocket and the launch pad
Gravity alteration as extermination tool viable?
It's a yearly task, alright
Is going from continuous data to categorical always wrong?
What happens with multiple copies of Humility and Glorious Anthem on the battlefield?
A curious inequality concerning binomial coefficients
The three point beverage
Configurable Product Dropdown Image Switch
Configurable products: product image not updating after selecting attribute in dropdownFatal Error Mediafallback.php on line 61How to correctly create a configurable product with multiple attributes and imagesHow to display Configurable/Color Swatches in Homepage Magento 1.9.1Magento - Fatal Error in Mediafallback.php - 1.9.2.4Configurable product image resolution issueIssue while Configuring color swatches in Magento 1.9.3.10How to show dropdown configurable attribute in Product Category View in Magento 2?Fatal error: Uncaught Error: Call to a member function getId() on null inProductimg.php errorlog in system.logMagento 1 EE 1.14.3.10 - Mage::getSingleton('core/resource')->getConnection('core_read') is returning null sometimes
I upgraded my site from EE 1.14.1.0 to 1.14.3.10 and now when I navigate to a configurable product that uses a drop down (not swatches) to change the image, the image does not change.
I have looked at the solutions in these exchanges, but none of them solved my issue:
Configurable products: product image not updating after selecting attribute in dropdown
^ This solution while it technically solves my problem, it doesn't keep the options in a dropdown, but switches them to swatches. We want the options to remain in a dropdown.
https://stackoverflow.com/questions/41845427/typeerror-product-configurableswatches-is-not-a-constructor-in-magento-1-9-3
^ This solution solves a JS error I also got, but doesn't fix the images switching part.
--
As soon as I navigate to the page, these errors are generated in system.log:
ERR (3): Warning: array_merge_recursive() expects at least 1 parameter, 0 given in /app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 336
ERR (3): Warning: array_unique() expects parameter 1 to be array, null given in /app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 337
ERR (3): Warning: array_map(): Argument #2 should be an array in /app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 340
ERR (3): Warning: array_merge(): Argument #1 is not an array in /app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 340
ERR (3): Warning: in_array() expects parameter 2 to be array, null given in /app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 345
Could this be what is causing the issue? If so, what might a solution be?
This was not an issue prior to updating. I have a support ticket out with Magento, but they are taking their sweet time (since November), so I thought I would see if anyone has any solutions.
--
Update 3/12
Magento sent me a patch that resolved the errors in system.log, but I am still unable to swap images based on the option selected in the dropdown.
In app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php update the filterImageInGallery function as follows:
public function filterImageInGallery($product, $image)
if (!Mage::helper('configurableswatches')->isEnabled())
return true;
if (!isset($this->_productImageFilters[$product->getId()])
&& $childAttributeLabelMapping = $product->getChildAttributeLabelMapping()
)
$mapping = call_user_func_array("array_merge_recursive", $childAttributeLabelMapping);
$filters = array_unique($mapping['labels']);
$filters = array_merge($filters, array_map(function ($label)
return $label . Mage_ConfigurableSwatches_Helper_Productimg::SWATCH_LABEL_SUFFIX;
, $filters));
$this->_productImageFilters[$product->getId()] = $filters;
return !in_array(Mage_ConfigurableSwatches_Helper_Data::normalizeKey($image->getLabel()),
$this->_productImageFilters[$product->getId()]);
return true;
configurable-product configurable-swatches magento-1.14.3.10
add a comment |
I upgraded my site from EE 1.14.1.0 to 1.14.3.10 and now when I navigate to a configurable product that uses a drop down (not swatches) to change the image, the image does not change.
I have looked at the solutions in these exchanges, but none of them solved my issue:
Configurable products: product image not updating after selecting attribute in dropdown
^ This solution while it technically solves my problem, it doesn't keep the options in a dropdown, but switches them to swatches. We want the options to remain in a dropdown.
https://stackoverflow.com/questions/41845427/typeerror-product-configurableswatches-is-not-a-constructor-in-magento-1-9-3
^ This solution solves a JS error I also got, but doesn't fix the images switching part.
--
As soon as I navigate to the page, these errors are generated in system.log:
ERR (3): Warning: array_merge_recursive() expects at least 1 parameter, 0 given in /app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 336
ERR (3): Warning: array_unique() expects parameter 1 to be array, null given in /app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 337
ERR (3): Warning: array_map(): Argument #2 should be an array in /app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 340
ERR (3): Warning: array_merge(): Argument #1 is not an array in /app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 340
ERR (3): Warning: in_array() expects parameter 2 to be array, null given in /app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 345
Could this be what is causing the issue? If so, what might a solution be?
This was not an issue prior to updating. I have a support ticket out with Magento, but they are taking their sweet time (since November), so I thought I would see if anyone has any solutions.
--
Update 3/12
Magento sent me a patch that resolved the errors in system.log, but I am still unable to swap images based on the option selected in the dropdown.
In app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php update the filterImageInGallery function as follows:
public function filterImageInGallery($product, $image)
if (!Mage::helper('configurableswatches')->isEnabled())
return true;
if (!isset($this->_productImageFilters[$product->getId()])
&& $childAttributeLabelMapping = $product->getChildAttributeLabelMapping()
)
$mapping = call_user_func_array("array_merge_recursive", $childAttributeLabelMapping);
$filters = array_unique($mapping['labels']);
$filters = array_merge($filters, array_map(function ($label)
return $label . Mage_ConfigurableSwatches_Helper_Productimg::SWATCH_LABEL_SUFFIX;
, $filters));
$this->_productImageFilters[$product->getId()] = $filters;
return !in_array(Mage_ConfigurableSwatches_Helper_Data::normalizeKey($image->getLabel()),
$this->_productImageFilters[$product->getId()]);
return true;
configurable-product configurable-swatches magento-1.14.3.10
add a comment |
I upgraded my site from EE 1.14.1.0 to 1.14.3.10 and now when I navigate to a configurable product that uses a drop down (not swatches) to change the image, the image does not change.
I have looked at the solutions in these exchanges, but none of them solved my issue:
Configurable products: product image not updating after selecting attribute in dropdown
^ This solution while it technically solves my problem, it doesn't keep the options in a dropdown, but switches them to swatches. We want the options to remain in a dropdown.
https://stackoverflow.com/questions/41845427/typeerror-product-configurableswatches-is-not-a-constructor-in-magento-1-9-3
^ This solution solves a JS error I also got, but doesn't fix the images switching part.
--
As soon as I navigate to the page, these errors are generated in system.log:
ERR (3): Warning: array_merge_recursive() expects at least 1 parameter, 0 given in /app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 336
ERR (3): Warning: array_unique() expects parameter 1 to be array, null given in /app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 337
ERR (3): Warning: array_map(): Argument #2 should be an array in /app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 340
ERR (3): Warning: array_merge(): Argument #1 is not an array in /app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 340
ERR (3): Warning: in_array() expects parameter 2 to be array, null given in /app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 345
Could this be what is causing the issue? If so, what might a solution be?
This was not an issue prior to updating. I have a support ticket out with Magento, but they are taking their sweet time (since November), so I thought I would see if anyone has any solutions.
--
Update 3/12
Magento sent me a patch that resolved the errors in system.log, but I am still unable to swap images based on the option selected in the dropdown.
In app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php update the filterImageInGallery function as follows:
public function filterImageInGallery($product, $image)
if (!Mage::helper('configurableswatches')->isEnabled())
return true;
if (!isset($this->_productImageFilters[$product->getId()])
&& $childAttributeLabelMapping = $product->getChildAttributeLabelMapping()
)
$mapping = call_user_func_array("array_merge_recursive", $childAttributeLabelMapping);
$filters = array_unique($mapping['labels']);
$filters = array_merge($filters, array_map(function ($label)
return $label . Mage_ConfigurableSwatches_Helper_Productimg::SWATCH_LABEL_SUFFIX;
, $filters));
$this->_productImageFilters[$product->getId()] = $filters;
return !in_array(Mage_ConfigurableSwatches_Helper_Data::normalizeKey($image->getLabel()),
$this->_productImageFilters[$product->getId()]);
return true;
configurable-product configurable-swatches magento-1.14.3.10
I upgraded my site from EE 1.14.1.0 to 1.14.3.10 and now when I navigate to a configurable product that uses a drop down (not swatches) to change the image, the image does not change.
I have looked at the solutions in these exchanges, but none of them solved my issue:
Configurable products: product image not updating after selecting attribute in dropdown
^ This solution while it technically solves my problem, it doesn't keep the options in a dropdown, but switches them to swatches. We want the options to remain in a dropdown.
https://stackoverflow.com/questions/41845427/typeerror-product-configurableswatches-is-not-a-constructor-in-magento-1-9-3
^ This solution solves a JS error I also got, but doesn't fix the images switching part.
--
As soon as I navigate to the page, these errors are generated in system.log:
ERR (3): Warning: array_merge_recursive() expects at least 1 parameter, 0 given in /app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 336
ERR (3): Warning: array_unique() expects parameter 1 to be array, null given in /app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 337
ERR (3): Warning: array_map(): Argument #2 should be an array in /app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 340
ERR (3): Warning: array_merge(): Argument #1 is not an array in /app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 340
ERR (3): Warning: in_array() expects parameter 2 to be array, null given in /app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 345
Could this be what is causing the issue? If so, what might a solution be?
This was not an issue prior to updating. I have a support ticket out with Magento, but they are taking their sweet time (since November), so I thought I would see if anyone has any solutions.
--
Update 3/12
Magento sent me a patch that resolved the errors in system.log, but I am still unable to swap images based on the option selected in the dropdown.
In app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php update the filterImageInGallery function as follows:
public function filterImageInGallery($product, $image)
if (!Mage::helper('configurableswatches')->isEnabled())
return true;
if (!isset($this->_productImageFilters[$product->getId()])
&& $childAttributeLabelMapping = $product->getChildAttributeLabelMapping()
)
$mapping = call_user_func_array("array_merge_recursive", $childAttributeLabelMapping);
$filters = array_unique($mapping['labels']);
$filters = array_merge($filters, array_map(function ($label)
return $label . Mage_ConfigurableSwatches_Helper_Productimg::SWATCH_LABEL_SUFFIX;
, $filters));
$this->_productImageFilters[$product->getId()] = $filters;
return !in_array(Mage_ConfigurableSwatches_Helper_Data::normalizeKey($image->getLabel()),
$this->_productImageFilters[$product->getId()]);
return true;
configurable-product configurable-swatches magento-1.14.3.10
configurable-product configurable-swatches magento-1.14.3.10
edited 3 hours ago
cbartell
asked Mar 6 at 18:55
cbartellcbartell
65
65
add a comment |
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f264761%2fconfigurable-product-dropdown-image-switch%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
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f264761%2fconfigurable-product-dropdown-image-switch%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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