Magento CE and trying to fix a plugin that is suppose to sync my products with the jet.com shopping portal. Unfortunately the developer has not responded to any request for help I am trying to fix it myself. its installed correctly and it is all configured. However when I go to sync an item to jet.com I see the following in my system log file

Undefined variable: store_id in app/code/local/MKMage/Jet/Helper/Data.php on line 65

I am wondering if anyone knows how to edit the below to fix this error? I tried adding the below to line 65 right after the else{ but got the same error

$store_id = = Mage::app()->getStore()->getStoreId();

The Data.php file is too big to past so you can see it here http://bit.ly/2bZnrcl

  • $store_id = Mage::app()->getStore()->getStoreId(); should work. (without the extra "=". Assuming that this is a backend module, try adding "$store_id = 0" in line 26, just to try it Aug 22, 2016 at 17:41
  • Hmm when I did that I get a 2016-08-22T14:13:36-04:00 DEBUG (7): HEADERS ALREADY SENT: <pre>[0] app/code/core/Mage/Core/Controller/Response/Http.php:52
    – Jayreis
    Aug 22, 2016 at 18:14

1 Answer 1


$store_id never gets defined according to the block of code I just saw.

Just underneath the line that has public function synchronizeProduct($id){ add this:

$store_id = Mage::app()->getStore()->getStoreId();

That should fix it. That will pass in the current store id. However if you always want to make sure you are editing default values, you can do this:

$store_id = Mage_Catalog_Model_Product::DEFAULT_STORE_ID;
  • @user1739740 did my answer help you out? Aug 26, 2016 at 17:40

Your Answer

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

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