Magento

Magento exception 'Varien_Exception' with message 'Invalid method Mage_CatalogRule_Model_Rule::loadProductRules

  • Posted on: 6 January 2015
  • By: markus.wilhelm

Dear all,
after I updated my shop to Magento CE 1.9.1 I was unable to save any product. After searching a while I found the problem must be anywhere arround price rules but I could not find a solution. A quick fix was to uncomment the function Mage::getModel('catalogrule/rule')->loadProductRules($product), I do not use price rules anyhow.

in /...//lib/Varien/Object.php:653
Stack trace:
#0 /...//app/code/core/Mage/CatalogRule/Model/Observer.php(72): Varien_Object->__call('loadProductRule...', Array)
#1 /...//app/code/core/Mage/CatalogRule/Model/Observer.php(72): Mage_CatalogRule_Model_Rule->loadProductRules(Object(Mage_Catalog_Model_Product))
#2 /...//app/code/core/Mage/Core/Model/App.php(1338): Mage_CatalogRule_Model_Observer->loadProductRules(Object(Varien_Event_Observer))
#3 /...//app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Mage_CatalogRule_Model_Observer), 'loadProductRule...', Object(Varien_Event_Observer))
#4 /...//app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('catalog_product...', Array)
#5 /...//app/code/core/Mage/Core/Model/Abstract.php(391): Mage::dispatchEvent('catalog_product...', Array)
#6 /...//app/code/core/Mage/Catalog/Model/Abstract.php(315): Mage_Core_Model_Abstract->_beforeSave()
#7 /...//app/code/core/Mage/Catalog/Model/Product.php(515): Mage_Catalog_Model_Abstract->_beforeSave()
#8 /...//app/code/core/Mage/Core/Model/Abstract.php(316): Mage_Catalog_Model_Product->_beforeSave()
#9 /...//app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(728): Mage_Core_Model_Abstract->save()
#10 /...//app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Catalog_ProductController->saveAction()
#11 /...//app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('save')
#12 /...//app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#13 /...//app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#14 /...//app/Mage.php(684): Mage_Core_Model_App->run(Array)
#15 /...//index.php(87): Mage::run('', 'website')
#16 {main}

public function loadProductRules($observer)
    {
	/** @var Mage_Catalog_Model_Product $product */
        $product = $observer->getEvent()->getProduct();
        if (!$product instanceof Mage_Catalog_Model_Product) {
            return $this;
        }
        //Mage::getModel('catalogrule/rule')->loadProductRules($product);
        return $this;
    }

New:

Development: 

Magento Varnish and Turpentine Error wiht Paypal

  • Posted on: 23 February 2013
  • By: markus.wilhelm

I had an error in my Magento Shop with 1.7 using Varnish and Turpentine extension. The redirect page from Magento to Paypal was cached and my customers did have a different basket in Paypal then the had previously in Magento. I changed the varnish config in the vcl_recv Funktion and added the following line:

Old:

if (req.restarts == 0) {
        if (req.http.X-Forwarded-For) {
            set req.http.X-Forwarded-For =
            req.http.X-Forwarded-For + ", " + client.ip;
        } else {
            set req.http.X-Forwarded-For = client.ip;
        }
    }
    set req.http.X-Turpentine-Secret-Handshake = "1";
     
         
    if (req.request !~ "^(GET|HEAD|PUT|POST|TRACE|DELETE|OPTIONS)$") {
        return (pipe);
    }

New:

if (req.restarts == 0) {
        if (req.http.X-Forwarded-For) {
            set req.http.X-Forwarded-For =
            req.http.X-Forwarded-For + ", " + client.ip;
        } else {
            set req.http.X-Forwarded-For = client.ip;
        }
    }
    set req.http.X-Turpentine-Secret-Handshake = "1";
     
    if (req.url ~ "^/paypal") {
        return (pass);
    }
     
         
    if (req.request !~ "^(GET|HEAD|PUT|POST|TRACE|DELETE|OPTIONS)$") {
        return (pipe);
    }

BR Markus

Development: 
Rettungspfoten: 

Neuigkeiten aus dem Rettungspfoten-Shop

  • Posted on: 23 February 2013
  • By: markus.wilhelm

Hi ihr,
wir verwenden seit einigen Tagen in unserem Rettungspfoten-Shop eine neue Shop-Software. Mit dieser konnten wir unseren Service für Sie verbessern. In Kürze werden die Lieferzeitangaben verbessert. Ab diesem Zeitpunkt kann auch der aktuelle Lagerbestand angezeigt werden. Ab sofort haben wir auch immer Produkte mit einem reduzierten Preis im Angebot. Ebenso können Sie direkt Artikel finden, die wir Ihnen als Tipp des Monats empfehlen und Artikel, die wir neu im Sortiment haben.

Test- oder Erfahrungsberichte finden Sie im Rettungspfoten-Blog.

Ebenso können Sie uns jetzt auch bei Facebook und Twitter finden. Dort werden wir unsere Neuheiten oder andere Informationen posten.

Development: 
Rettungshunde: 
Beruf: 
Rettungspfoten: 

Migrate XT Commerce to Magento Release 1.7.1

  • Posted on: 23 February 2013
  • By: markus.wilhelm

Dear all,
the new release fixes some bugs found during the last tests and will support Magenta CE 1.7. You mus not install the script from Magento Connect, please download the zip file and extract it to the magento root installation folder. Please read the config file carefully. Please discuss the topics in our board.
You can find some how tos in here:
http://g2forum.bessieundmarkus.de/how-to-magento.html

Please report bugs to our Bugtracker:
http://bugs.rescue-dogs.de/

You may download the script in from here: migrate_1.7.1.zip

Development: 

Magento error in order by name for directory_country_region bug

  • Posted on: 23 February 2013
  • By: markus.wilhelm

Dear all,
after searching like hell for solving the error message while trying to save the system default configuration in Magento I finally found an "error". Not sure where this comes from: Magento, German Market Ready. Whell I don't care, it now works ;-)
Just change the file: app/code/core/Mage/Directory/Model/Resource/Region/Collection.php

class Mage_Directory_Model_Resource_Region_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
{
...
 
 protected function _construct()
    {
        $this->_init('directory/region');
 
        $this->_countryTable    = $this->getTable('directory/country');
        $this->_regionNameTable = $this->getTable('directory/country_region_name');
 
// comment out the next line-----------------------------------------------
        //$this->addOrder('name', Varien_Data_Collection::SORT_ORDER_ASC);
// ------------------------------------------------------------------------
        $this->addOrder('default_name', Varien_Data_Collection::SORT_ORDER_ASC);
    }
...
}
BR Markus
Development: 

XAMP 1.8.1 and zip.so

  • Posted on: 3 December 2012
  • By: markus.wilhelm

Dear all,
after upgrading to XAMP 1.8.1 the PHP extension zip.so was not delivered any more. Trying to install via pecl directly failed. After searching a long time I found some bugs in the code for PHP 5.4.7 (which is the version delivered by apachefriends) and compiled the zip extension.

Command line installation with pecl: pecl install zip
Failed with errors.

Errors found:
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_extract_file':
/tmp/pear/temp/zip/php_zip.c:187: error: 'struct _php_core_globals' has no member named 'safe_mode'
/tmp/pear/temp/zip/php_zip.c:187: error: 'CHECKUID_CHECK_FILE_AND_DIR' undeclared (first use in this function)
/tmp/pear/temp/zip/php_zip.c:187: error: (Each undeclared identifier is reported only once
/tmp/pear/temp/zip/php_zip.c:187: error: for each function it appears in.)
/tmp/pear/temp/zip/php_zip.c:241: error: 'struct _php_core_globals' has no member named 'safe_mode'
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_add_file':
/tmp/pear/temp/zip/php_zip.c:291: error: 'struct _php_core_globals' has no member named 'safe_mode'
/tmp/pear/temp/zip/php_zip.c:291: error: 'CHECKUID_CHECK_FILE_AND_DIR' undeclared (first use in this function)
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_glob':
/tmp/pear/temp/zip/php_zip.c:532: error: 'struct _php_core_globals' has no member named 'safe_mode'
/tmp/pear/temp/zip/php_zip.c:532: error: 'CHECKUID_CHECK_FILE_AND_DIR' undeclared (first use in this function)
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_pcre':
/tmp/pear/temp/zip/php_zip.c:594: error: 'struct _php_core_globals' has no member named 'safe_mode'
/tmp/pear/temp/zip/php_zip.c:594: error: 'CHECKUID_CHECK_FILE_AND_DIR' undeclared (first use in this function)
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_get_property_ptr_ptr':
/tmp/pear/temp/zip/php_zip.c:840: error: too few arguments to function 'std_hnd->get_property_ptr_ptr'
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_read_property':
/tmp/pear/temp/zip/php_zip.c:883: error: too few arguments to function 'std_hnd->read_property'
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_has_property':
/tmp/pear/temp/zip/php_zip.c:932: error: too few arguments to function 'std_hnd->has_property'
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_object_new':
/tmp/pear/temp/zip/php_zip.c:1044: error: 'zend_class_entry' has no member named 'default_properties'
/tmp/pear/temp/zip/php_zip.c: In function 'zif_zip_open':
/tmp/pear/temp/zip/php_zip.c:1147: error: 'struct _php_core_globals' has no member named 'safe_mode'
/tmp/pear/temp/zip/php_zip.c:1147: error: 'CHECKUID_CHECK_FILE_AND_DIR' undeclared (first use in this function)
/tmp/pear/temp/zip/php_zip.c: In function 'c_ziparchive_open':
/tmp/pear/temp/zip/php_zip.c:1436: error: 'struct _php_core_globals' has no member named 'safe_mode'
/tmp/pear/temp/zip/php_zip.c:1436: error: 'CHECKUID_CHECK_FILE_AND_DIR' undeclared (first use in this function)
/tmp/pear/temp/zip/php_zip.c: In function 'zm_startup_zip':
/tmp/pear/temp/zip/php_zip.c:2580: warning: assignment from incompatible pointer type
/tmp/pear/temp/zip/php_zip.c:2583: warning: assignment from incompatible pointer type
/tmp/pear/temp/zip/php_zip.c:2584: warning: assignment from incompatible pointer type

I changed some code in php_zip.c and php_zip.h of version: zip-1.10.2 (you can find changed files and the zip.so file in the attached php_zip.zip file)

Manual Installation:
export PHPPATH=/opt/lampp/
wget http://pecl.php.net/get/zip
tar -zxvf zip
cd zip-1.10.2/
./configure --with-php-config=$PHPPATH/bin/php-config --enable-zip
make

php.ini
After this I was ale to change php.ini file and my PHPExcel Class works again fine ;-)

zip

Zip enabled
Extension Version $Id: php_zip.c 284448 2009-07-20 15:26:54Z pajoye $
Zip version 1.9.1
Libzip version 0.9.0
Development: 

Migrate XT Commerce to Magento Release 1.5.10

  • Posted on: 13 November 2011
  • By: markus.wilhelm

Dear all,
the new release fixes some bugs found during the last tests. You mus not install the script from Magento Connect, please download the zip file and extract it to the magento root installation folder. Please read the config file carefully.  Please discuss the topics in our board.
You can find some how tos in here: http://g2forum.bessieundmarkus.de/how-to-magento.html
Please report bugs to our Bugtracker: http://bugs.rescue-dogs.de/
You may download the script in from here: migrate_1.5.10.zip

Development: 

Migrate XT Commerce to Magento Release 1.5.9

  • Posted on: 29 August 2011
  • By: markus.wilhelm

Dear all,
the new release fixes some bugs found during the last tests.

You mus not install the script from Magento Connect, please download the zip file and extract it to the magento root installation folder. Please read the config file carefully.
Please discuss the topics in our board.
You can find some how tos in here: http://g2forum.bessieundmarkus.de/how-to-magento.html
Please report bugs to our Bugtracker: http://bugs.rescue-dogs.de/

You may download the script in from here: migrate_1.5.9.zip

Development: 

Migrate XT Commerce to Magento Release 1.5.5

  • Posted on: 23 August 2011
  • By: markus.wilhelm

Dear all,
the new release of the migration script is finished. It offers the possibility to migrate an XT Commerce shop of release v3.0.4 to Magento 1.5 release. One of the most important news is the possibility to migrate a second language for products, categories and CMS pages.

You mus not install the script from Magento Connect, please download the zip file and extract it to the magento root installation folder. Please read the config file carefully.
Please discuss the topics in our board.
You can find some how tos in here: http://g2forum.bessieundmarkus.de/how-to-magento.html
Please report bugs to our Bugtracker: http://bugs.rescue-dogs.de/

You may download the script in from here: migrate_1.5.5.zip

Development: 

Seiten