`
kirenenko04
  • 浏览: 145967 次
  • 性别: Icon_minigender_2
  • 来自: 上海
社区版块
存档分类
最新评论
文章列表
public function indexAction() { $this->loadLayout(); $this->_initLayoutMessages('customer/session'); $this->_initLayoutMessages('catalog/session'); //load meta info $head = $this->getLayout()->getBlock('head'); $he ...
<?php class Bysoft_Myimage_Helper_Data extends Mage_Core_Helper_Abstract { function common_filesize($url) { $user=''; $pass=''; $parse = parse_url($url); $host = $parse['host']; if ($host == 'gogear.preprodbysoftchina.com') { $user='gogear'; $pass='bysoft2014'; retu ...
1.rewrite core model in config.xml <models> <mycaptcha> <class>Bysoft_Mycaptcha_Model</class> <resourceModel>mycaptcha_mysql4</resourceModel> </mycaptcha> <captcha> <rewrite> <zend>Bysoft_Mycaptcha_Model_Zend& ...
//before your validation add this code <script type="text/javascript"> //<![CDATA[ Object.extend(Validation, { isVisible : function(elm) { return true; }, }); var contactForm = new VarienForm('becomedistributorForm', true); //]]> </script>  
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='.$_product->getId();?>"> <img src="<?php ...

print div

Using the code On 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"> <head> <title>Untitled Page</title> <script languag ...
//remove product images: public function remove_image_files($_product_id) { if ($_product_id) { $simple_product = Mage::getModel('catalog/product')->load($_product_id); //clean all product images; $mediaApi = Mage::getModel("catalog/product_attribute_media_api"); tr ...
1. subscribe Mage::getModel('newsletter/subscriber')->subscribe($customer->getEmail());  2.unsubscribe Mage::getModel('newsletter/subscriber')->loadByEmail($customer->getEmail())->unsubscribe();  
1. rewrite adminhtml edit form blocks in config file   <global> <blocks> <mycms> <class>Bysoft_Mycms_Block</class> </mycms> <adminhtml> <rewrite> <cms_page_edit_form>Bysoft_Mycms_Block_Adminhtml_Cms_Page ...
SET FOREIGN_KEY_CHECKS = 0; TRUNCATE TABLE eav_attribute_option_value; TRUNCATE TABLE `eav_attribute_option`; SET FOREIGN_KEY_CHECKS = 1;  
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 single value.  And obviously for multiselect, we’ll be interested in setting multiple values. With Text a ...
/** * check attribute value exits or not * @param unknown $arg_attribute * @param unknown $arg_value * @return unknown|boolean */ public function attributeValueExists($arg_attribute, $arg_value) { $attribute_model = Mage::getModel('eav/entity_attribute'); $attribute_ ...
$str = 'something'; $end = '.xls'; $search = "/^{$str}.*?{$end}$/"; if (preg_match($search, $file_name)) { var_dump($file_name); }  
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_product_bundle_selection`; TRUNCATE TABLE `catalog_product_entity_datetime`; TRUNCATE TABLE `catalo ...
1. rewrite adminhtml router: <config> <admin> <routers> <adminhtml> <args> <modules> <Bysoft_Myfaq_Adminhtml before="Mage_Adminhtml">Bysoft_Myfaq_Adminhtml</Bysoft_Myfaq_Ad ...
Global site tag (gtag.js) - Google Analytics