Tagged: gaming

mysql queries 0

mysql queries

mysql queries 1. Add column age and desg in emp_prof table. Mysql> use profile; Mysql>alter table emp_prof add column age int; Mysql> alter table emp_prof add column desg char(10); 2. Update all records of...

Magento: How to get product rating and review 23

Magento: How to get product rating and review

Magento: How to get product rating and review code for getting ratings and reviews for any particular product. /* Getting reviews collection object */ $productId = $product->getId(); $reviews = Mage::getModel(‘review/review’) ->getResourceCollection() ->addStoreFilter(Mage::app()->getStore()->getId()) ->addEntityFilter(‘product’, $productId)...

wysiwyg editor Magento Custom Module 5

wysiwyg editor Magento Custom Module

wysiwyg editor Magento Custom Module Step 1 – Go to app/code/local/Webkul/Faq/Block here webkul is namespace and faq is module name , under your _prepareLayout() function add this code public function _prepareLayout() { if (Mage::getSingleton(‘cms/wysiwyg_config’)->isEnabled()...

magento display attribute in dropdown 1

magento display attribute in dropdown

magento display attribute in dropdown Create a attribute and then edit app/code/core/Mage/Catalog/Block/Navigation.php public function getAllManu() { $product = Mage::getModel(‘catalog/product’); $attributes = Mage::getResourceModel(‘eav/entity_attribute_collection’) ->setEntityTypeFilter($product->getResource()->getTypeId()) ->addFieldToFilter(‘attribute_code’, ‘manufacturer’); //can be changed to any attribute $attribute = $attributes->getFirstItem()->setEntity($product->getResource());...

captcha alpha numeric in php 6

captcha alpha numeric in php

captcha alpha numeric in php <?php $RandomStr = md5(microtime());// md5 to generate the random string $ResultStr = substr($RandomStr,0,8); $im = @imagecreate(110, 20) or die(“Cannot Initialize new GD image stream”); $background_color = imagecolorallocate($im, 0, 0,...