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> <action method="addCss"><stylesheet>css/share/jquery.share.css</stylesheet></action> <action method="addItem"><type>skin_js</type><name>js/share/qrcode.min.js</name></action> <action method="addItem"><type>skin_js</type><name>js/share/jquery.share.min.js</name></action> </reference>
2. write html file with product
<?php $_product_id = $this->getData('current_product_id'); $_product = Mage::getModel('catalog/product')->load($_product_id);?> <?php $productName = $_product->getName(); ?> <?php $productUrl = $_product->getProductUrl(); ?> <?php $productImage = $_product->getImageUrl() ?> <!-- share BEGIN --> <div class="share-list hp-shareTo-inner J_share_list_<?php echo $_product_id?>"> <a href="javascript:" data-type="weixin" class="btn-share-weixin" title="<?php echo $this->__('weixin')?>"><?php echo $this->__('weixin')?></a> <a href="javascript:" data-type="weibo" class="btn-share-weibo" title="<?php echo $this->__('weibo')?>"><?php echo $this->__('weibo')?></a> <a href="javascript:" data-type="qq" class="btn-share-qq" title="<?php echo $this->__('qq')?>"><?php echo $this->__('qq')?></a> <a href="javascript:" data-type="douban" class="btn-share-douban" title="<?php echo $this->__('douban')?>"><?php echo $this->__('douban')?></a> </div> <!-- share END --> <!-- share js begin--> <script> var url = '<?php echo $productUrl; ?>'; </script> <script> (function($){ $('.J_share_list_<?php echo $_product_id?> a').bind('click', function() { var type = $(this).data('type'); $.shareAPI(type, { url: url, title: '<?php echo $productName;?>', pic: '<?php echo $productImage;?>', source: { }, buttons: { 'weixin': { text: 'weixin', className: 'weixin', url: '' }, 'weibo': { text: 'weibo', className: 'weibo', url: 'http://v.t.sina.com.cn/share/share.php?url={url}&title={title}&pic={pic}&appkey={appkey}&ralateUid={ralateUid}&searchPic={searchPic}' }, 'qq': { text: 'qq', className: 'qq', url: 'http://connect.qq.com/widget/shareqq/index.html?url={url}&title={title}&pics={pic}&summary={summary}&desc={desc}&site={site}' }, 'douban': { text: 'douban', className: 'douban', url: 'http://www.douban.com/share/service?href={url}&name={title}&text={summary}' }, } }); }); })(jQuery); </script> <!-- share js end -->
More file download please go here:
https://github.com/nevergiveup-j/HP/tree/master/share
相关推荐
NULL 博文链接:https://justcoding.iteye.com/blog/2100394
Chapter 3, Enabling Performance in Magento 2, explains how to configure different types of caching options. In Magento 2, the Full Page Cache (FPC) can be handled by Varnish to give your store a ...
Magento 2 Beginners Guide by Gabriel Guarino English | 14 Mar. 2017 | ASIN: B01MS81BQX | 442 Pages | AZW3 | 31....He is also a moderator in Magento forums, and he is a frequent speaker at Magento events.
NULL 博文链接:https://justcoding.iteye.com/blog/1711166
NULL 博文链接:https://justcoding.iteye.com/blog/1886183
MarkShust_SimpleData 简化了调用Magento的数据结构。 目录 概括 调用Magento数据结构可能会... composer require markshust/magento2-module-simpledata bin/magento module:enable MarkShust_SimpleData bin/magento
演示地址:http://olegnax.com/product/athlete-responsive-magento-theme/livepreview/ Athlete Magento主题,兼容Magento 1.9.x, 1.8.x, 1.7.x ,特点:完全自适应(响应式布局),自定义子主题,无限颜色,完全...
magento数据结构分析 magento数据字典
Chapter 3, Enabling Performance in Magento 2, explains how to configure different types of caching options. In Magento 2, the Full Page Cache (FPC) can be handled by Varnish to give your store a ...
magento2-简单产品饲料一个简单的Magento 2产品Feed示例目的是创建一个简单的产品Feed,以探索Magento 2。
magik shoes magento 模板, magento 1.7 模板
概述该存储库包含将Magento 2与TurnTo的Social Commerce服务连接的Magento 2扩展。 与Magento社区和企业版2.1.x-2.3.x兼容。安装说明使用Composer安装(推荐) 在您的Magento根安装目录中运行以下命令: composer ...
magento的SMTP插件magento的SMTP插件magento的SMTP插件
深入理解Magento 由精东博客下载下来制作成pdf
Magento插件开发手册 Magento Extension Developers Guide
Magento Magento商城 Magento目录结构
magento2 developers cookbook, magento 开发手册,magento教程
BigBridge产品导入 你好! 我叫帕特里克·范·卑尔根。 我创建此库是因为我需要快速导入产品。 该库通过直接数据库查询将产品数据导入到Magento 2中。 它具有这些主要特征 ... $product = new Simple
主要包括的内容有:magento的常用设置、Magento模板制作教程、Magento商城_目录结构说明、Magento中文教程实用文档、常用的xml的文件的作用以及自定义模块的应用