自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(26)
  • 收藏
  • 关注

原创 说说WordPress的主查询函数-query_posts()

今天说说WordPress的主查询函数-query_posts(),因为我正在制作的主题里面多次用到了这个函数。 query_posts()查询函数决定了哪些文章出现在WordPress主循环(loop)中,正因为如此,query_posts函数仅用于修改主页循环(Loop),而不是在页面上生成次级循环。如果你希望在主循环外另外生成循环,应该新建独立的WP_Quer...

2012-11-30 11:06:48 491

原创 wordpress提取文章(最新,最热,随机)

1. WordPress中获取最新文章的代码<li> <h2>最新文章</h2> <?php query_posts('showposts=6&cat=-111'); ?> <ul> <?php while (have_posts()) : the_post(); ...

2012-11-30 06:10:11 654

原创 wordpress自定义个性化首页

自己好不容易折腾了个wordpress博客,发现所有人的首页样式都大同小异,是不是很没创意,很扫兴?下面就来说说如何制作一个wordpress个性化首页,让你随心所欲的改变首页的样式,让你有个不一样的主页。 一、 设置wordpress首页wordpress有设置page页作为默认首页的功能,下面的方法就是自定义一个page也模板,然后添加一个用这个模板制作的page页,最后将...

2012-11-29 06:32:21 4786

原创 magento图片处理 Customize Magento’s Image Resize Functionality

1. Customize Magento’s Image Resize Functionality Need to remove the white border around your images? Don't want everything to be square? Here is how to customize the ->resize functionality...

2012-11-29 01:16:32 148

原创 magento EAV数据库Magento EAV structure & role of eav_attribute’s backend_type field

Introduction:Magento database is based on EAV(Entity Attribute Value) architecture. And it uses this architecture especially for categories, products, customers & customer addresses.Befo...

2012-11-29 00:21:04 130

原创 magento变换编辑器How to use WYSIWYG editor (TinyMCE) in custom Admin Magento Module

Rich text editor(TinyMCE) is an often requirement for Admin Module as it makes the content editing work much more easier.In order to enable TinyMCE editor in textarea field, You need to do the fol...

2012-11-29 00:20:22 179

原创 magento 获取用户信息 How to get customer First Name, Last Name , Email Address ...

1. How to get customer First Name, Last Name , Email Address or Details in magentoBefore geting the details of a customer you must to have check whether Customer is Logged in or not, If ...

2012-11-15 12:59:15 401

原创 magento 开发模式 Configuring Magento for Development / Debug Mode

Configuring Magento for Development / Debug Mode:1. Disable Cache System > Cache Management > Select All [check-boxes] > Actions = Disable > Submit 2. Re-Index All System ...

2012-11-14 01:15:17 113

原创 magento检测登录How to check if customer is already logged in from another location?

In order to check whether the current user is logged in or not, we can easily find out using the following code:if(Mage::getSingleton('customer/session')->isLoggedIn()){ //customer is logged...

2012-11-14 01:12:16 315

原创 magento创建动态菜单 Create Dynamic CMS Navigation For Magento Frontend

IntroductionAs you know in Magento, catalog has dynamic menu but cms doesn’t in frontend.If you are curios about how to create dynamic menu for CMS which can either be included in left or right ...

2012-11-14 01:06:43 110

原创 magento 数组转object How to convert an array to a collection object in magento?

ScenarioSuppose say we have an array of data fetched from database.And we want to merge it with Magento collection object or want to provide the data as collection object to the view(template)...

2012-11-14 01:03:08 139

原创 magento添加fancy页面 Creating fancy FAQ page in Magento – an easier approach

IntroductionJust keep reading this tutorial which will teach how to create a fancy FAQ with expandable/collapsible feature in an easier approach.In short, creating a fancy FAQ section can be eas...

2012-11-14 00:59:22 129

原创 magento 时间处理 Playing with Dates in Magento

IntroductionBeing a PHP developer, you are no way hiding from PHP’s date() function.In case of Magento, makes an usage of timezone which is configured from the backend (System > Configurati...

2012-11-13 13:45:32 102

原创 magento 添加上传功能 Adding upload field in contact form and send as attachment

IntroductionNowadays most of the clients wants extra fields in contacts form of magento to fulfill their requirements. And adding custom fields other than upload field (for example: text, textar...

2012-11-13 13:38:30 355

原创 magento 合并登录和注册页面 Merging registration form with default login page of magento

In customer.xml within your theme you can move the account register block to within the login page.<reference name="content"> <block type="customer/form_login" name="custom...

2012-11-13 13:30:07 161

原创 magento如何获取产品属性值 How to Obtain Custom Attribute Values in Magento

Today let’s talk about Magento and custom attributes. With Magento you can create as many custom attributes for your products as you like, and there are different attribute types such as:Text F...

2012-11-10 05:07:20 127

原创 magento 获取产品存货量以及configurable product 下associated children product信息

Magento – Get Product Stock QuantityTo get the quantity in stock for a particular product in Magento use the following code -$qtyStock = Mage::getModel('cataloginventory/stock_item')->loadByP...

2012-11-10 02:08:32 126

原创 Magento 获取有效属性 Display available options for attributes of Configurable

1. 获取全部//get Product$cProduct = Mage::getModel('catalog/product')->load($_product->getId()); //check if product is a configurable type or notif ($cProd...

2012-11-07 12:45:46 103

原创 Magento获取产品自定义属性及对应的值

自定义产品属性后,通常可以设置其是否在产品查看页中显示,可显属性将会出现在additional information 中。但是这边我需要在分类列表页中调用产品特定的属性。 在列表页循环获取对应产品的id之后,直接输出产品的所有属性内容会太多,getData等取出的信息又过于简洁。总之用起来不是很爽,于是根据app/code/core/Mage/Catalog/Block/Produc...

2012-11-07 10:45:40 528

原创 PHP判断字符串是纯英文、纯汉字或汉英混合

PHP判断字符串是否为中文(或英文)的方法,除了正则表达式判断和拆分字符判断字符的值是否小于128 外还有一种比较特别的方法。使用php中的mb_strlen和strlen函数判断 方法比较简单:分别使用以上两个函数以当前编码测出字符的返回值,然后比较返回值。 返回值相等的为纯英文、纯数字、英数混排; 返回值不等,且strlen返回值可被mb_strlen整除的为纯汉字...

2012-11-06 06:29:05 452

原创 如何显示Magento的最新产品

Magento购物车默认没有提供最新上架产品的页面,我们需要调用数据库中最新添加的产品,指定数量并在模板文件中调用该段代码。为了演示,我们将从数据库中调用最新产品的方法写在模板文件中。当然,在开发中调用数据的代码还是放入页面相对应的Block文件当中。 <?php$_productCollection = Mage::getResourceModel('reports/produ...

2012-11-02 11:12:26 101

原创 wp_nav_menu($args)函数说明

wp_nav_menu()用于显示头部、标题、底部的导航菜单。后台设置位于:外观=》菜单。目前支持 3 个菜单选项。 函数使用说明:<?php $defaults = array( 'theme_location' => '', 'menu' => '', 'container' => 'div', 'co...

2012-11-02 01:14:26 199

原创 magento 管理首页侧栏 How to manage home page sidebar blocks

Home Page blocks.Home page blocks in Magento are controlled by the Magento administration panel. So all change should be done there.  1. Open Magento admin panel2. Go to CMS > Pages ...

2012-11-01 12:56:44 310

原创 magento 首页添加最新产品 Display new products on the home page

方法一 : (widget) This tutorial will show you how to add the new products block to the home page. All modifications would be done in Magento admin panel.  Open the admin panel, go to CMS&gt...

2012-11-01 12:18:58 270

原创 magento创建自定义页面 (Bestseller实例) Bestseller products in Magento

Bestseller or best selling product is one of the features people tend to ask for when it comes to Magento™. There are multiple ways to implement this feature.In this example, I’m not using con...

2012-11-01 12:11:18 206

原创 magento 上传图片slider Multiple Banner Extension

Multiple Banner Extension 1. Magento Connect 1.0 : magento-community/MultiBanner_Module2. Magento Connect 2.0 : http://connect20.magentocommerce.com/community/MultiBanner_Module...

2012-11-01 01:37:58 134

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除