Tag Archives: magento

Remove empty categories from magento menu

Questions: I want my main menu to not include any categories that are empty. I’ve done this for the layered navigation very easily in the relevant phtml file by using $_category->getProductCount() However, for the navigation menu, I’m finding it impossible to do this as easily (I have seen the Prattski example but it does seem… Read More »

Creating a new customer in Magento(RESTful,PHP)

Questions: I am trying to create a new customer in Magento. Here’s PHP script I wrote for that <?php $callbackUrl = “http://localhost/magento/webservices/NewCustomer1.php”; $temporaryCredentialsRequestUrl = “http://localhost/magento/oauth/initiate?oauth_callback=”. urlencode($callbackUrl); $adminAuthorizationUrl = ‘http://localhost/magento/admin/oauth_authorize’; $accessTokenRequestUrl = ‘http://localhost/magento/oauth/token’; $apiUrl = ‘http://localhost/magento/api/rest’; $consumerKey = ‘s3xt7w8lwhfrrfzrfvwm3lrilkf66d5n’; $consumerSecret = ‘vr3eq1x899pz1cf4zzxjzx3q03t66r3n’; session_start(); if (!isset($_GET[‘oauth_token’]) && isset($_SESSION[‘state’]) && $_SESSION[‘state’] == 1) { $_SESSION[‘state’] = 0; }… Read More »

Magento order status change events

Questions: I want to change via web service a remote inventory, I know that via Event Observer Method can triger my code, but I don’t know which event is useful to complete my task, like on_order_complete, is there an updated list of events or more documentation? Answers:

Magento module Fatal error: Class 'Mage_Cashondelivery_Helper_Data' not found in \xampp\htdocs\magento\app\Mage.php on line 516

Questions: I am developing a payment Module for Magento. I did this using this tutorial http://www.magentocommerce.com/wiki/5_-_modules_and_development/payment/create-payment-method-module I have created folder app/local/Companyname/Cashondelivery/Block app/local/Companyname/Cashondelivery/Model app/local/Companyname/Cashondelivery/controller app/local/Companyname/Cashondelivery/etc app/local/Companyname/Cashondelivery/helpers The etc/config.xml <?xml version=”1.0″?> <config> <modules> <Companyname_Cashondelivery> <!– declare module’s version information for database updates –> <version>0.1.0</version> </Companyname_Cashondelivery> </modules> <global> <!– declare model group for new module –> <models> <!–… Read More »

Magento get a product collection in an arbitrary order

Questions: I have developed a custom search engine for our Magento store and I am trying to load the product collection in a very specific order (I have ranked the results according to an algorithm I designed). I can load the product collection correctly, however it is not in the order that I would like… Read More »