国际电子商务技术 & Magento开发公司

Maishen technologies

Welcome visitor! You canlogin orcreate an account.

热线:+86-0532-58973093

麦神科技有限公司
Mygod Technologies

官方认证开发工程师

在购物车页面充分利用magento的促销规则!

2012年6月19日星期二 Asia/Shanghai上午9:50:28

magento的后台的促销是蛮强大的,有产品详细页面的促销规则,也有购物车的促销规则,我们在使用的过程中,对产品详细页面的使用还是蛮充分的,使用tier price,或者使用购物车规则。

在产品购物车页面,这个也不失为一个非常好的选择,进入magento的购物车页面,设置为根据个数进行促销的方式,关于促销的必要性,曾经有一个做联想销售的经理,闲聊的时候告诉我,做一个产品,使用swot分析法和4P分析法,没有分析不出来的!详情如下:

营销4P分析法:Product,Price,Place,Promotion取其开头字母。中文意思为,产品,价格,渠道,促销,百科查看详细地址:http://baike.baidu.com/view/4282.htm

swot分析法:竞争优势,竞争劣势,机会和威胁!百科查看具体地址:http://baike.baidu.com/view/95520.htm


从上面的4P分析法,可以看到,促销是营销的一个重要环节,有必要性,我们就要琢磨如何在我们的网站使用这个理论,进而查看效果。magento的购物车页面,如果客户更新产品个数需要的操作为:修改购物车里面中产品的qty列下面的text框,然后点击update checkout cart,然后才能修改个数,做电子商务的理念是让客户很少的操作,很少的步骤完成购物,因为人在购物的时候心情是非常放松的,上了一天的班,工作了一天,大家都累了,在网购的时候不想继续动脑,因为这是享受的时光,所以我们要把此时的客户当时一个傻逼看待,让他们很2的情况下,也能神不知鬼不觉的完成购物,好了,上面说的都是理论,下面写一写如何修改吧:

找到文件

template/checkout/cart/item/default.phtml

找到代码行,大致181行,是qty的代码,将input哪行改为:

   <select class="input-text qty" name="cart[<?php echo $_item->getId() ?>][qty]"  onchange="this.form.submit()">
            
             <?php
                 for($ij = 1;$ij<=10; $ij++){
                     if($ij != ($this->getQty())){
                     echo '<option value ="'.$ij.'">'.$ij.'</option>';
                     }else{
                     echo '<option selected="selected" value ="'.$ij.'">'.$ij.'</option>';    
                         
                     }
                     
                 }
            
             ?>
            
        
        </select>

保存即可!

效果如下:

0 Comments | Posted in Magento使用 By terry water

改变list页面产品底部的的评论url

2012年6月18日星期一 Asia/Shanghai下午3:12:47

magento的评论默认是单独的一个页面,也就是在产品详细页面,和产品分类页面都可以点击这个链接进入评论页面,但是有的时候,我们想吧评论功能放到产品详细页面底部,而不是放在单独的一个页面,这样我们需要在产品详细页面把评论产品的功能调出来,然后修改在分类页面和详细页面顶部的评论url

1

在产品详细页面把评论产品的功能调出来:

在<catalog_product_view>

标签下面,找到代码:

 <reference name="content">            <block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">

把下面这个block当做子block加入到上面的block。

 <block type="review/product_view_list" name="product.info.product_additional_data" as="product_review" template="review/product/view/list.phtml"> <block type="review/form" name="product.review.form" as="review_form"/> </block> 

然后在template/catalog/product/view.phtml

里面通过

<?php echo $this->getChildHtml("product_review");  ?>

把评论信息调用出来

2

修改产品list页面和产品详细页面顶部的URL

找到 \app\code\core\Mage\Review\Block\Helper.php

  public function getReviewsUrl()    {   

    return Mage::getUrl('review/product/list', array(           'id'        => $this->getProduct()->getId(),           'category'  => $this->getProduct()->getCategoryId()        )); 

  }

改为:

 public function getReviewsUrl()    { return Mage::getModel('catalog/product')->load($this->getProduct()->getId())->getUrlPath();    

}

然后在

\app\design\frontend\maishen\mgfocal\template\review\helper\summary_short.phtml

改为:

  <div class="ratings">                 

  <div class="rating-box">       

        <div class="rating" style="width:<?php echo $this->getRatingSummary() ?>%">

</div>         

  </div>         

      <span class="amount">

<a href="<?php echo $this->getReviewsUrl() ?>#customer-reviews">

<?php echo $this->__('%d Review(s)', $this->getReviewsCount()) ?>

</a>

</span> 

  </div>

OK,搞定!

 

magento建站服务,magento模板magento插件

0 Comments | Posted in magento扩展 By terry water

在您的网站上添加人人,微博的分享按钮

2012年6月18日星期一 Asia/Shanghai上午7:15:25

譬如本篇文章下面的分享按钮,单个搞比较麻烦,可以通过一段小js实现这个分享功能

只要把下面的代码拷贝,然后复制到你想要显示的地方即可

<!-- Baidu Button BEGIN -->
    <div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare">
        <span class="bds_more">分享到:</span>
        <a class="bds_qzone"></a>
        <a class="bds_tsina"></a>
        <a class="bds_tqq"></a>
        <a class="bds_renren"></a>
        <a class="shareCount"></a>
    </div>
<script type="text/javascript" id="bdshare_js" data="type=tools&amp;uid=256116" ></script>
<script type="text/javascript" id="bdshell_js"></script>
<script type="text/javascript">
    document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + new Date().getHours();
</script>
<!-- Baidu Button END -->

里面是float:left的方式,可能添加上会有点乱,自己在调一下样式就好了!

0 Comments | Posted in Magento教程 By terry water

如何快速删除magento的插件?

2012年6月16日星期六 Asia/Shanghai下午6:30:27

这是一篇初级文章,相信经常使用Magento的人都会,这篇文章是写给初级使用者看的一篇博文

在安装Magento插件后,有的插件我们不想使用了,想删除掉,初次使用magento的人会问,需要我到服务器上把每一个文件都删除掉吗?

答案是不需要,进入网站根目录,找到app/etc/modules文件下,下面是各个模板的配置文件,您找到您安装的插件的xml文件,打开,下面是一个例子:

<?xml version="1.0"?>
<config>
    <modules>
        <TBT_Rewards>
            <active>true</active>
            <codePool>community</codePool>
            <depends>
                <Mage_Rule/>
                <Mage_Catalog/>
                <Mage_Sales/>
                <Mage_Customer/>
            </depends>
        </TBT_Rewards>
    </modules>
</config>

譬如上面的代码,只要把

  <active>true</active>
改为:

  <active>false</active>

就可以了,如果你懒的改代码,直接删除这个xml文件,模块就不起作用了,因为这个是模块的入口配置,没有这个配置文件,模块是不加载的!

0 Comments | Posted in Magento使用 By terry water

在magneto系统中输出tier price的最小值

2012年6月16日星期六 Asia/Shanghai上午11:39:22

有的时候,我们想输出产品的tier price 的最小值!如图:

 

下面是解决的办法:


1.

在catalog/product/view文件夹下新建一个文件: getlowest.phtml
<?php

/**
* @E-Commercewebdesign.co.uk
*/
$_product = $this->getProduct();
$_tierPrices = $this->getTierPrices();
$_finalPriceInclTax = $this->helper('tax')->getPrice($_product, $_product->getFinalPrice(), true);

$_weeeTaxAmount = Mage::helper('weee')->getAmountForDisplay($_product);
if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))) {
$_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product);
}

?>
<?php if (count($_tierPrices) > 0): ?>
<?php if ($this->getInGrouped()): ?>
<?php $_tierPrices = $this->getTierPrices($_product); ?>
<?php endif; ?>
<?php Mage::helper('weee')->processTierPrices($_product, $_tierPrices); ?>
<?php $i = 0; ?>
<?php $_tierPrices = array_reverse($_tierPrices); ?>
<?php foreach ($_tierPrices as $_price): ?>
<?php if($i==0){ ?>
<p style="font-weight:bold; font-size: 1em;">After tier pricing the lowest price you can have a Cowboy Hat is...
<span style="font-size:150%; text-decoration:underline;">
<?php echo $_price['formated_price']; ?>
</span>
<p>
<?php $i++; ?>
<?php } ?>
<?php endforeach ?>
<?php endif;?>

 

2. 

在catalog_product_view这个block下面加入这个block

<block type="catalog/product_view" name="getlowest" as="getlowest" template="catalog/product/view/getlowest.phtml" />

3. 

在希望显示tier price最小值的地方,调用下面的代码:

<?php echo $this->getChildHtml('getlowest') ?>

然后就会显示出来,如果我们想在其他页面调用,譬如产品列表页面调用,可以按照下面的方式操作

public function getLowestPrice($_product)
{
$prices = new Mage_Bundle_Block_Catalog_Product_View();
$_tierPrices = $prices->getTierPrices($_product);
$count = $_product->getTierPriceCount();

if ($count > 0):
$i = 0;
$_tierPrices = array_reverse($_tierPrices);

foreach ($_tierPrices as $_price):
if($i==0){
return $_product->getFormatedTierPrice($_price);
$i++;
}
endforeach;
endif;
}

通过这个函数调用就可以得到!

OK,完毕!

0 Comments | Posted in magento原理 By terry water
 
  • Mygod Technologies
  • 麦神科技有限公司
  • 香港中路8号
  • 中铁青岛中心大厦A3001
  • 市南区, 青岛, 266000
  • 电话: 0532-5897-3093

订阅我们的最新消息。

我们将严格尊重您的隐私。

关注我们的微信
获取外贸电子商务最新资讯;跨境推广最新策略;电子商务网站技术最新趋势。

2018 Mygod Technologies. 保留所有权. Privacy Policy