Search the Wiki

Viewing 51 to 60 of 233 items

Php – Remove the last character from string

I have a string like a,b,c,d,e, I would like to remove last ',' and get the remaining string back OUTPUT: a,b,c,d,e Here is what i did  echo rtrim("a,b,c,d,e,", ",")   Hope it helps ^^

0

Magento – ADDATTRIBUTETOFILTER CONDITIONALS

addAttributeToFilter is a method that can be called on EAV collections in Magento. This includes product collections, category collections, customer collections and many more. In short, it adds a condition to the WHERE part of the MySQL query used to extract a collection from the database, therefore allowing you to filter the collection by custom  Full Article…

0

Magento – Functions cheatsheet

General functions Function Description $this->getRequest()->getServer(‘HTTP_REFERER’); Get the referer URL Product related functions Function Description $product->getName() Get product name $product->getSku() Get product sku Mage::getModel(‘cataloginventory/stock_item’)->loadByProduct($_product)->getQty() Get product stock $product->getResource()->getAttribute(‘color’)->getFrontend()->getValue($product) Get a product attribute value (like color/size) $product->isSaleable() checks if a product is salable $product->isisAvailable() checks if a product type is salable Mage::getModel(‘catalogrule/rule’)->calcProductPriceRule($product,$product->getPrice()) Gets the product final price  Full Article…

0

Ubuntu – Assign static name for partitions

If you are running Linux system and you have an additional disk in your computer, you can see that the partion name will change after you reboot your operating system. That's issue is not good for users who want to have a static link of those partitions. Here is the solution to resolve your problem.  Full Article…

0

Linux – 10 Screen Command Examples to Manage Linux Terminals

Screen is a full-screen software program that can be used to multiplexes a physical console between several processes (typically interactive shells). It offers a user to open several separate terminal instances inside a one single terminal window manager. The screen application is very useful, if you are dealing with multiple programs from a command line interface  Full Article…

0

Magento – List of Shopping Cart Price Rule Tables

Here is the table list of Shopping Cart Price Rule. 1. salesrule Create rule info will get it from here. 2. salesrule_coupon Coupon info will get here 3. salesrule_coupon_usage How many time used this coupon by customer ID 4. salesrule_customer 5. salesrule_customer_group Rule mapped to which customer groups 6. salesrule_label 7. salesrule_product_attribute attribute based rule  Full Article…

0

Mysql – Too many connections

If you see the error "… To many connections…" while you are accessing your website, you can do the following ways: 1. In your mysql my must to run this: Set Global max_connections=2000 I'm using phpMyAdmin and I executed   2. In your my.conf file (usually located in /etc) find the line that says: [mysqld] And somewhere  Full Article…

0

SEO – How To Use H1-H6 HTML Elements Properly

The six heading elements, H1 through H6, denote section headings. Although the order and occurrence of headings is not constrained by the HTML DTD, documents should not skip levels (for example, from H1 to H3), as converting such documents to other representations is often problematic. W3C However, you do not need to use all six HTML elements to structure  Full Article…

0