- 博客(175)
- 收藏
- 关注
GW 3.2 固件安装流程 - 塞尔达时之笛版
所有工具1 . 机体内TF卡固件存放 a) 将机体内TF卡取出 b) 将机体内TF卡内容进行备份进电脑 c) 格式化TF卡(使用附件松下内存格式化工具) d) 然后用电脑将3.2固件的两个文件, 分别是 mest_区号.cia 和 Launcher.dat 复制进TF卡. e) 将 TF卡放回机体内部....
2015-05-01 14:51:59
602
原创 VMware workstation 9虚拟机中安装Ubuntu 13.04系统
http://www.server110.com/vmware/201309/1705.html
2015-01-15 08:14:17
161
Magento Add Custom Field to Customer Address
Adding Field to AdminFirst we need to create the address attribute. There are two ways to do this one is through your module sql file or you can do it through directly through sql query.First we...
2014-12-27 10:28:57
252
Magento export order item data
<?phpclass Bysoft_Export_Model_Order extends Mage_Core_Model_Abstract{ protected function _construct(){ $this->_init("export/order"); $this->_write = Mage::getS...
2014-12-26 14:56:45
159
Magento export csv conver chinese utf8 error
/** * Write item data to csv export file * * @param Varien_Object $item * @param Varien_Io_File $adapter */ function _exportCsvItem(Varien_Object $item, Varien_Io_File $adap...
2014-12-26 11:49:03
173
我叫你不出红叉
提莫一大早就高高兴兴的出门了,走着走着遇到了盖伦,盖伦一把抓住提莫,啪啪!抽了他两个大嘴巴,然后说:“我叫你不出红叉!” 第二天,提莫出了红叉又出门了,走着走着又遇见了盖伦,盖伦又一把抓过提莫,啪啪!抽了他两个大嘴巴:“我让你出红叉!”提莫非常郁闷,就跑到皇子那里去投诉盖伦,皇子听了提莫的投诉说,你放心好了,我会帮助你的。皇子找来了盖伦对他说:“盖伦啊,咱俩是多年的好朋友了,今天上午提莫...
2014-12-25 15:06:05
271
Magento Adding Store View selection to your Module’s Adminhtml
While developing an extension recently I came across the need to add the ability to allow changes on a store view level.To start off with I wanted to make sure this functioned the same as the built...
2014-12-22 16:25:41
156
Magento random display same category product
public function get_random_same_cate_products() { $_product = $this->getProduct(); $categoryIds = $_product->getCategoryIds(); if(count($categoryIds) ){ foreach ($categoryIds as $...
2014-12-17 18:11:18
132
验证密码必须由字母和数组组成并且长度是6-30位
public function checkPassword($pwd) { if (strlen($pwd)>30 || strlen($pwd)<6) { return array('status'=>false,'msg'=>$this->__('The length of password must be 6 to 30....
2014-12-16 15:39:39
1775
Magento IE Only Stylesheet
Sometimes you want to enable IE only stylesheets for Magento. The problem is that the documentation to accomplish this is somewhat lacking. I decided to shed some light on a solution to help you out...
2014-12-15 13:03:57
121
Magento addAttributeToFilter with Mutliple Select
The solution is to use a 'Finset' query such as:$this->_productCollection->addAttributeToFilter("make", array("finset"=>"38"));A discussion can be seen here: http://www.magentocommer...
2014-12-11 10:05:32
134
Magento compare products ajax
1. add compare html elem: <!-- compare box --> <div class="compare-box"> <?php echo $this->__('compare')?> <a c...
2014-12-09 14:40:19
184
php 正则表达式 匹配中日韩字符(GBK)
首先是这些非英文字符的编码范围:这里是几个主要非英文语系字符范围2E80~33FFh:中日韩符号区。收容康熙字典部首、中日韩辅助部首、注音符号、日本假名、韩文音符,中日韩的符号、标点、带圈或带括符文数字、月份,以及日本的假名组合、单位、年号、月份、日期、时间等。3400~4DFFh:中日韩认同表意文字扩充A区,总计收容6,582个中日韩汉字。4E00~9FFFh:中日韩认同表意文...
2014-12-08 13:56:49
469
Magento create new product attribute and create new attribute group
1.add new product attribute<?php //增加一个是否预售的属性,到所有商品$installer = $this;/* @var $installer Mage_Core_Model_Resource_Setup */$installer->startSetup();$objCatalogEavSetup = Mage::g...
2014-11-26 20:07:45
160
Magento clean all product in compare list ajax function
1. clean function in controller : //clecn all products in compare list public function cleanajaxAction() { $items = Mage::getResourceModel('catalog/product_compare_item_collection'); if (Ma...
2014-11-25 11:11:30
105
Change any page meta title desc in Magento in controller
public function indexAction() { $this->loadLayout(); $this->_initLayoutMessages('customer/session'); $this->_initLayoutMessages('catalog/session'); ...
2014-11-21 16:47:46
110
Magento get remote image size by auth user and password
<?phpclass Bysoft_Myimage_Helper_Data extends Mage_Core_Helper_Abstract{ function common_filesize($url) { $user=''; $pass=''; $parse = parse_url($url); $host = $parse['host']; ...
2014-11-21 10:20:36
97
Customize magento native captcha appearance. Change amount of lines and dots
1.rewrite core model in config.xml<models> <mycaptcha> <class>Bysoft_Mycaptcha_Model</class> <resourceModel>mycaptcha_mysql4</resourceModel> </...
2014-11-19 14:30:53
125
Magento make hidden input field validation
//before your validation add this code<script type="text/javascript">//<![CDATA[Object.extend(Validation, { isVisible : function(elm) { return true; },}); var contactForm...
2014-11-14 14:48:39
103
magento use fancy box load local video files
ajax link<li class="video-li"> <a class="fancybox-video fancybox.ajax" href="<?php echo $this->getUrl('catalog/ajax/video') .'?attr=video_url_1&product_id='.$...
2014-11-13 21:30:24
112
print div
Using the codeOn the click of a button I have called JavaScript printDiv which will print the first DIV content. Please refer to the below code: <html xmlns="http://www.w3.org/1999/xhtml...
2014-11-12 10:59:22
108
magento remove or add image to product programmly
//remove product images:public function remove_image_files($_product_id) { if ($_product_id) { $simple_product = Mage::getModel('catalog/product')->load($_product_id); //clean all pr...
2014-11-11 14:43:04
91
magento subscripbe or unsubscribe newsletter for customer
1. subscribeMage::getModel('newsletter/subscriber')->subscribe($customer->getEmail()); 2.unsubscribeMage::getModel('newsletter/subscriber')->loadByEmail($customer->getEmail())->u...
2014-11-10 15:57:09
119
Magento - Add Custom Image Field To Cms Page Edit Form
1. rewrite adminhtml edit form blocks in config file <global> <blocks> <mycms> <class>Bysoft_Mycms_Block</class> </mycms> <adminhtml>
2014-11-09 13:30:40
162
magento clean all dopdown and multyselect options data
SET FOREIGN_KEY_CHECKS = 0; TRUNCATE TABLE eav_attribute_option_value;TRUNCATE TABLE `eav_attribute_option`;SET FOREIGN_KEY_CHECKS = 1;
2014-11-08 10:00:46
73
Magento – Set Product Dropdown and Multiselect Values Programmatically
Here’s how to programmatically, meaning through code, set a product’s attribute value when the attribute is of type Dropdown or Multiselect. For dropdown, we’ll be interested in setting only a singl...
2014-11-07 17:57:42
107
Magento – Programmatically insert new attribute option
/** * check attribute value exits or not * @param unknown $arg_attribute * @param unknown $arg_value * @return unknown|boolean */ public function attributeValueExists($arg_attribute...
2014-11-07 17:56:35
78
匹配以指定字符串和指定字符串结尾的正则表达式
$str = 'something';$end = '.xls';$search = "/^{$str}.*?{$end}$/";if (preg_match($search, $file_name)) { var_dump($file_name);}
2014-11-07 14:43:06
12106
truncate all product data ON CE 1.9
SET FOREIGN_KEY_CHECKS = 0; TRUNCATE TABLE `core_url_rewrite`;TRUNCATE TABLE `catalog_product_bundle_option`; TRUNCATE TABLE `catalog_product_bundle_option_value`; TRUNCATE TABLE `catalog_pr...
2014-11-07 11:17:07
98
Add HTML edit - wysiwyg Field in custom module
1. rewrite adminhtml router:<config> <admin> <routers> <adminhtml> <args> <modules> <B...
2014-11-06 10:30:36
99
Magento Ajax Rating Star
1.in product view phtml, use fancy box to add a click for rating star (fancy ajax) <?php echo $this->getReviewsSummaryHtml($_product, 'star_ajax', true)?> 2. rewrite getReviewsSum...
2014-11-06 08:57:10
134
force file download with PHP
$file_url = 'http://www.myremoteserver.com/file.exe';header('Content-Type: application/octet-stream');header("Content-Transfer-Encoding: Binary"); header("Content-disposition: attachment; filen...
2014-11-05 16:16:48
145
Get Price of Configurable Product options
Here is how you can get the prices of the simple products. The example is for a single configurable product but you can integrate it in your loop.There may be a problem with performance because there...
2014-11-05 11:35:09
101
Automatically approving ratings and/or reviews
This one kept me up all night, and would like to offer these code snippets to save someone else the trouble of automatically approving ratings and reviews. Using this page as a guide: http://www.mage...
2014-11-05 11:33:30
115
magento Remove "Choose an Option" from configurable dropdown.
spConfig.setInitialState = function(dropdown_id) { //select dropdown var dropdown = $(dropdown_id); //remove empty option from dropdown so it is not se...
2014-11-04 15:36:39
66
get multiselect attribute values on the product
/** * get multiselect attribute values on the product */ public function get_mulselect_attr_values($_attribute_code, $productId) { $storeId = Mage::app()->getStore()->getStoreId();...
2014-11-04 14:48:50
71
get the first numeric position from a string
public function explode_sku($sku) { $sku_arr = str_split($sku); foreach ($sku_arr as $key=>$val) { if (is_numeric($val)) { return $key; } } return false; }
2014-11-04 13:55:48
68
on hover show/hide element
$('.selectorClass').hover(function(){ $(this).stop().fadeTo('slow',0.4);},function(){ $(this).stop().fadeTo('slow',1);});
2014-11-03 16:39:16
135
原创 Simple social sharing product in Magento
1. add js and css to your layout config file <reference name="head"> <action method="addCss"><stylesheet>css/fancybox/jquery.fancybox-1.3.4.css</stylesheet></action
2014-11-02 20:10:16
121
Add or Remove Product Using Ajax
1. rewrite core compare action<?xml version="1.0"?><config> <modules> <Bysoft_Mycatalog> <version>0.1.0</version> </Bysoft_Mycata
2014-11-02 15:59:06
91
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人