This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| # address and port accepted by the server | |
| listen 80; ## listen for ipv4 | |
| #listen [::]:80 default ipv6only=on; ## listen for ipv6 | |
| # server IP to compare against http requests, uncomment and set proper value. | |
| # Enter the hostname or IP address you use to reach this server. If you run on your dev environment it might be localhost. | |
| # Note: If your vb install is in a folder inside your domain <mysite>/forum/install/path please change location directives defined below to include the path first. e.G: | |
| # vbulletin.com/forum | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| red=`tput setaf 1` | |
| green=`tput setaf 2` | |
| reset=`tput sgr0` | |
| # ======================================================= | |
| # Run Script Command: curl -O https://gist.github.com/bryanlittlefield/8a2ba8fa4c9ae84cc370c8cea5074a7a/raw/build-tugboat-update-env.sh && sh build-tugboat-update-env.sh | |
| # | |
| # | |
| # Actions: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $incrementid ="100000004"; | |
| $_order = Mage::getModel('sales/order')->loadByIncrementId($incrementid); | |
| OR | |
| $order_id ="4"; | |
| $_order = Mage::getModel('sales/order')->load($order_id); | |
| $_shippingAddress = $_order->getShippingAddress(); | |
| echo $_shippingAddress->getFirstname() . ' | |
| '; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Update Core Function getAvailableOrders() in : /app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php | |
| ---------------------------------------------------------------------------------------------------------------- | |
| <?php | |
| public function getAvailableOrders(){ | |
| // CUSTOM SORT | |
| $this->_availableOrder = array( | |
| 'position' => $this->__('Best Value'), | |
| 'entity_id' => $this->__('Newest'), | |
| 'name' => $this->__('Name'), | |
| 'price' => $this->__('Price'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| On Product Page Make Sure to Use | |
| <!-- ************************* Fetch Product and Info ************************* --> | |
| <?php $_helper = $this->helper('catalog/output'); ?> | |
| <?php $_product = $this->getProduct(); ?> | |
| <!-- ======================================================================== --> | |
| <?php | |
| $model = Mage::getModel('catalog/product') //getting product model | |
| $_product = $model->load($productid); //getting product object for particular product id | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| First Load Coupon Object | |
| -------------------------- | |
| <?php $coupon = Mage::getModel('salesrule/coupon'); | |
| $coupon->load($this->getQuote()->getCouponCode(), 'code'); | |
| $couponObj = Mage::getModel('salesrule/rule')->load($coupon->getRuleId()); | |
| ?> | |
| Then Use the Following to get the Name or Description | |
| ----------------------------------------------------- | |
| <?php echo $couponObj->getName(); ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Clean Up Dashboard | |
| add_action('admin_init', 'rw_remove_dashboard_widgets'); | |
| function rw_remove_dashboard_widgets() { | |
| remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal'); // recent comments | |
| remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); // incoming links | |
| remove_meta_box('dashboard_plugins', 'dashboard', 'normal'); // plugins | |
| remove_meta_box('dashboard_quick_press', 'dashboard', 'normal'); // quick press | |
| remove_meta_box('dashboard_recent_drafts', 'dashboard', 'normal'); // recent drafts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| function myRegistryValidate(){ | |
| var formToValidate = $('Insert Magento Form ID'); | |
| var validator = new Validation(formToValidate); | |
| if(validator.validate()) { | |
| //Do Stuffs | |
| } | |
| } | |
| </script> |
NewerOlder