Board logo

标题: [开发经验技巧分享] Zen cart 常用二次开发教程及模块收集整理(不定期更新) [打印本页]

作者: jfx    时间: 2012-11-1 01:17     标题: Zen cart 常用二次开发教程及模块收集整理(不定期更新)

本帖最后由 jfx 于 2012-11-1 01:22 编辑
9 [- l! ~7 A( F2 U) r+ n4 W4 L7 I# f; h$ A8 a, F
首页轮换广告flash+xml实现的方法4 @+ h) I# @1 e; o& b( x
/ T1 I/ z: F0 B/ @$ r
终于找到比较合适,又简单的的方法来实现,我用的是Bcastr 4.0测试版, E; }; h9 P) x5 H0 h# T' F$ X% k
希望对大家有帮助 不多说了,开始8 X/ [- `7 Z* J
8 P: S  v, y* A, j: \/ X( p& }
首先下载源代码文件' M" Q0 d# p9 f
http://www.girlmerry.com/tt/example.zip- B' D6 q8 W* R+ X' ~' G
! f! J" z% B' ]8 S( s: H6 g$ }( m
将bcastr4.swf 和bcastr.xml上传到网站的跟目录 可以将images里面的文件可以上传做测试用/ g/ r' J% e4 U2 C) @" ]( W
* M: U( [. }( q* A7 X) D0 b
然后在后台工具>广告管理>选择你要修改的广告地方$ K' v% |* P# F$ K8 k. s
" e9 Z" R7 h' {2 q  `$ i& u3 O
在HTML文本处添加如下代码# v+ y' u3 D( C5 R' ~
代码: 全选<object id="bcastr4" data="bcastr4.swf?xml=bcastr.xml" type="application/x-shockwave-flash" width="716" height="274">' W# |7 y, r6 R/ x
        <param name="movie" value="bcastr4.swf?xml=bcastr.xml" />
2 m1 O/ ]; q$ i/ h! @</object>, [- ?6 N& `% `% D, S& M* y4 @

$ z, a, W2 N2 [2 o* Y1 @$ b* ~& e' a

# @+ O+ m* ?* A' A, S$ A! a# K# f高度、宽度自己设置
( R" i$ V; L* _' F7 `2 K+ G: [2 z) L5 [- l2 a# ~
更改图片描述等相关信息在bcastr.xml里面更改
( Z, _- O, ^7 o$ C: c# e( D# a: B7 R+ R" [8 C
以下用”.”描述xml树结构并说明参数作用: R6 |+ n* Y0 b- o) ^+ X1 Y

- E& w3 L3 r/ l6 J! A影片信息
) @/ C( P7 d# R& F8 ^1 n" ~0 S9 D& u9 t* h
channel.item% g0 V" W9 v0 ]* P
图片信息,可以设置多张图片
! p' w! _4 B, \! Q- A
7 ~% o& d" J( Bchannel.itme.image
! s% y3 a! x* z  o图片地址参数,此参数是唯一必须要有的参数,其他参数都有默认参数& Z: f1 F$ D4 d: u" j
" a( A- m/ y9 s
channel.itme.link- ~/ d* D  M9 D6 @- j
对应图片的连接
8 ^, O  q2 K2 @. v; e3 |' s+ K2 g5 s% g1 z* c& E) M5 \
channel.itme.tilte- C0 u0 E# ?. R8 x
对应图片的标题
9 K' h9 T1 i1 t, m
1 }$ S' `( `3 |2 q. K; e* i设置5 R/ B* C+ ~! E: y
' l( {3 b# S' f% k3 f+ Y
config.roundCorner1 F" y: ~" e+ c9 \# a
图片的圆角
+ V1 i. M1 |" x
) o4 R& X+ C# l3 B; q" [config.autoPlayTime
" i* H% c3 B# x( a' T5 |图片切换时间,默认值是8,单位秒
. \% h8 u4 H- w+ O- |' J5 M( K  }4 V1 P% S4 w- [% Y
config.isHeightQuality1 k4 ?: J7 W. o
图片缩小是否采用高质量的方法,默认值false
& _& m0 n# F2 F/ P# n, D+ k8 w; k+ L
config.normal
$ q. s+ B& y$ u" u& j8 I% R图片的混合模式6 c4 `6 y+ ~. N7 t
1 V4 g  B; [' j+ T5 Z
config.transDuration. I, A' c( s" o4 F3 @
图片在切换过程中的时间,默认值1,单位秒
  E/ S# f  u) n, n" z2 q) x% P  a0 b/ h! ^0 H# \4 |% ?
config.windowOpen8 e  g* P! t  s" m
图片连接的打开方式,默认值”_blank”,在新窗口打开,也可以使用”_self”,使用本窗口打开. b% {- o1 `* j' ]" i* D1 Q+ z5 m

( I- x% \9 p8 w1 u  oconfig.btnSetMargin
* F* p2 c( b) ~: k  t按钮的位置,文字的位置,用了css的margin概念,默认值”auto 5 5 auto”,四个数值代表 上 右 下 左 相对于播放器的距离,四个数值用空格分开,不需具体数值用”auto”填写 ,比如左上对齐并都有10像素的距离可以写 “10 auto auto 10″, 右下角对齐是”auto 10 10 auto”
$ {3 X( R, `, L8 d. T6 V' {6 f2 `0 W2 {! T
config.btnDistance
4 x- L) Z' E! W) y每个按钮的距离,默认值20
5 B7 y' L) {" ]0 t, G4 O! H: Q  O
config.titleBgColor: P. I6 I  k% Q; a/ M
标题背景的颜色,默认0xff6600
" s8 l0 f/ v3 ~% Q7 }# E8 P! G: B# `- M! S8 L, n
config.titleTextColor; X' I/ c% H1 t' _# U. X, @$ Y
标题文字的颜色,默认0xffffff
0 V* b1 ]3 E! \$ f+ |: D2 v8 `. b/ E+ p+ M/ f3 u. A
config.titleBgAlpha4 d1 q" f5 A3 s' E9 C. g: E8 F
标题背景的透明度,默认0.75
0 @: |+ I* L! [
  {- C( Q- \; w8 F! A- T% Nconfig.titleFont2 ]: Z  U( Y! Q3 O* n
标题文字的字体,默认值”微软雅黑”- _" T7 w" G7 m# G2 p

& ?1 F9 l+ V2 |$ w2 [9 M' b5 ]config.titleMoveDuration
5 W' `1 s4 @# a; B标题背景动画的时间,默认值1,单位秒
; ?2 ~5 I+ y8 P% f4 T2 N- c" G/ v2 K1 R7 l
config.btnAlpha0 P1 u) [" C, I/ z6 w' W* e! d
按钮的透明度,默认值0.75 y+ h7 y' W& f! q; J" L

2 g& v$ g- w. \% D% r( r  {% pconfig.btnTextColor
4 ~  D  c: m' B6 H按钮文字的颜色,默认值0xffffff
- Q5 C. Q# k- M8 L% c/ w8 w) Q0 d$ \, g; v% s
config.btnDefaultColor
$ ?" a( }5 A* T8 k按钮的默认颜色,默认值0x1B3433' _1 A5 l2 ~4 k$ P4 h( B" {2 m/ W

* u: g1 e4 _0 p0 {, n: ~% Rconfig.btnHoverColor# D6 v4 S: i# S0 w3 ~& u2 e
按钮的默认颜色,默认值0xff9900# }( B3 u7 f( i$ Q* u, N
  M) Z0 X$ H- p# [! L
config.btnFocusColor
8 @4 _+ L) Y0 h按钮当前颜色,默认值0xff6600' J; u; v! |; g7 z/ J4 _0 j

; v- h; X" K* W  X2 }config.changImageMode5 S: A) s+ D: ^. m
切换图片的方法,默认值”click”,点击切换图片,还可以使用”hover”,鼠标悬停就切换图片
- c) d( Z/ Z- ~3 R( L4 v2 ^2 B* e, B
config.isShowBtn
. r& i7 t; Z% s& D6 j- Q是否显示按钮,默认值”true”
/ c; [( o) R, p: j; T4 b0 L% b* f5 E5 ]0 u  |. b, F9 h1 i
config.isShowTitle8 r' j6 t! x3 j- ?" p% ^2 w
是否显示标题,默认值”true”
- A/ D$ w2 a- Y  |
/ y) f. [2 A; k; v* Oconfig.scaleMode  E; [/ A. o' P  Q7 a- U
图片放缩模式: 默认值是”noBorder”
6 S, s+ O1 X' `“showAll”: 可以看到全部图片,保持比例,可能上下或者左右
. {) g1 G, u, L- Q“exactFil”: 放缩图片到舞台的尺寸,可能比例失调) U* P  x$ r$ R8 B  e; x, l
“noScale”: 图片的原始尺寸,无放缩
, J2 v) y! \* h* N“noBorder”: 图片充满播放器,保持比例,可能会被裁剪) _9 }# }& u+ E/ m: t3 j
" l  J* P9 s  W0 K5 K  ^
config.transform
1 {( \, w! X) G图片放缩模式: 默认值是”alpha”; B% S- t  k. l4 h$ [; c9 B- Z
“alpha”: 透明度淡入淡出- C% H$ W2 c3 u2 j) i  K
“blur”: 模糊淡入淡出* m2 d0 S. a- v
“left”: 左方图片滚动' G9 [' Y% E! O) ~- j8 L: k  b
“right”: 右方图片滚动! M! U# m& Z! a2 i8 F
“top”: 上方图片滚动
; r2 P! W* r1 o“bottom”: 下方图片滚动# T3 Y' O, H. ~2 [' H2 |
“breathe”: 有一点点地放缩的淡入淡出% {( S7 ]  S. b5 ]- `- V
“breatheBlur”: 有一点点地放缩的模糊淡入淡出,本页的例子就是这个
/ k8 z# U3 P9 t9 `5 d/ Y4 T
0 C" e7 u! h% n8 A) fconfig.isShowAbout
. h: @* {, F* {& Z% T! {; Y1 _5 i是否显示关于信息,默认值”true”
作者: jfx    时间: 2012-11-1 01:19

Wishlist Manager 3 d# U3 D4 t- E

3 ?* g! X( A1 c" k, v3 }+ Hhttp://eazyecommerce.com/platforms/zen-cart/modules/wishlist-manager% ^& T4 D8 C, t1 J$ R/ ?! V- b  N
, t" D9 w& C* e) ~; j
要钱买..
% P$ F) t" j8 @  }8 }" ^3 x
6 q: ?6 \3 c6 Z7 ^/ d
作者: jfx    时间: 2012-11-1 01:20     标题: Ajax Onepage Checkout

Ajax Onepage Checkout
; s% w* ]6 }4 D, \7 \
. ^" r. F9 L3 E0 {/ Xhttp://eazyecommerce.com/platforms/zen-cart/modules/ajax-onepage-checkout
) [. q3 O) H* L! \: }
( J; q# R) X1 ?% _# y- M$ e要钱买...) x: M# R6 @/ y) o. N6 X6 V

作者: jfx    时间: 2012-11-1 01:27     标题: 模块插件专栏

本帖最后由 jfx 于 2012-11-1 01:34 编辑 ' I' Z; B! n% U* J$ N' W! p" O
, }& J7 A" l: G' {
Jquery Lightbox
" B. j) H0 H3 I: G% \$ Q
1 O( Y0 |$ _3 ^http://www.zen-cart.com/showthread.php?117656-Jquery-Lightbox-Support-thread/page2&highlight=jquery+lightbox1 F* w% ?+ P: f+ ]( `
ZJ Silver9 ?6 H6 \2 B9 e2 W/ @
9 V* ?9 P  z: y% M
http://www.zen-cart.com/downloads.php?do=file&id=721
- T8 o9 Q, h: a* w0 h简介:) V. q! O! \9 S6 r# s
ZenCart jQuery Silver is a jQuery magic version of ZenCart.1 A; @: _3 V; a& J+ V& P
It contains collapsible and removable sideboxes, stored in a cookie so states are remembered on page load.7 o+ a# t2 a+ W) {9 @3 M" z
Additional product images are displayed in a carousel and all product images are also displayed in a lightbox effect.
1 I+ h+ [) A0 g. L. P; |Also, some pages such as the shipping estimator and pop up help pages have been replaced with the lightbox effect.
* p5 j( g  I7 z& k& |, k; PThis is the first release, is well tested but needs credits for the jQuery stuff added.   E3 H- s3 ]) u2 I& B9 E6 R
JQLightBox+JQZoom_For_ZenCart 修改版
6 A/ {1 b) {+ X! l' T
9 }- d1 n) A7 M# whttp://www.zen-cart.cn/forum/topic136304.html9 I  O6 U! n. [5 A
简介:
; i2 Z# o) V" `  z$ Q3 D" IJQLightBox 和 JQZoom 是 Zen Cart 较常用的两个图片展示效果增强模块! B* r. S0 G, Y! k9 D1 I
原来在安装 JQLightBox 和 JQZoom 这两个模块时 还需要先安装 css_javascript_loader 模块才能正常加载. _  ?8 ~/ \+ e, j3 c
即便如此 亦有很多童鞋 尚不能正常安装使用这两个模块- g6 N+ O. ]; z* w, q& _2 s
这里 稍加作了点修改 省去了 再安装 css_javascript_loader模块这一步 简化的安装过程和出错机率
3 l% `3 H6 R: k/ F直接上传 模块文件下的 imgaes 文件夹 和 includes 文件夹到你的Zen Cart程序目录下 覆盖即可; O( y0 X* ~! j8 L
对默认的程序 可以直接覆盖 如果 自行修改了对应的文件或安装了 涉及到修改相同文件的模块
7 K0 I; \% [/ \  t" q0 i+ y- i请参照各 文件夹下的 文件 备份对应的文件后 再覆盖或修改操作4 t+ f2 ]$ _# H/ o/ P6 W

3 y! ~1 O6 J6 B+ A& d上传模块文件时 注意 先将 本文件夹下的 "你的当前模板目录名" 更改为 与 你当前使用的模板文件夹名称相同的文件名 切记 !!!
  \& C* g% o$ b8 }* q/ R2 S
2 d5 k( `, M9 c需要对应修改的地方有两处 + l5 ~; z* N( [4 G! Q* |/ O: U
分别位于 includes/templates/ 下 和 includes/modules/ 下6 l, K# U; u1 a

8 Y8 @  t* \9 H9 k2 b0 d, h6 W如果当前模板或网站使用了共用jquery库的话# ~% s, C' l( C% C9 d. b1 D$ q. b
建立 参照下面帖子 后面 的建议 去掉 这两模块所加载的 jquery库文件+ n6 k+ N) Z9 X2 F* M% j. r2 N+ V( e
http://www.zen-cart.cn/forum/topic86244.html
- ]# J/ n8 V1 p9 \! i( m1 _0 @0 Q. E' U/ F9 X: e3 E7 ~
文件夹 安装卸载 下的 文件 为 模块数据库 安装 和 卸载脚本
0 k( N, S0 E8 V# o  T8 h: k. K6 T* f3 O6 V8 C7 s2 V
RSS Feed8 q# B# D& Z( j# U
http://www.zen-cart.com/downloads.php?do=file&id=5118 s7 I# {$ c: G/ T
简介:
+ V/ P# g5 E! I0 d$ B' T8 j5 E4 dGenerate RSS Feed for:
) A/ t7 R& U% O6 s, ECategories;2 x& `( \1 n; R% [) `- y  h
Subcategories in category;" B$ [1 `4 J! ?
All Products;, o1 k% _* I. |* l2 h
Products in category;
# Z! \8 ~, f" G7 F3 D" b5 U" n) zProduct by ID;' V8 w. b; N& ]: ^3 V
Product by MODEL;
! z& m) }2 v, l" ^9 Z: eNew products;
+ s- z$ d, l* kNew products in category;
5 u3 N  a( T0 P, f5 u6 |; V( [New products random;
3 d' P1 j' Q1 X2 F1 N/ rNew products random in category;
( n7 Q) X4 |" f+ a6 z0 W- HBest sellers;
4 v. ~8 O7 V8 y6 q* F) e, wBest sellers in category;
9 E, d0 w/ ]" a% tBest sellers random;
5 y, r: F+ W- W8 Z' q9 v. f: iBest sellers random in category;" x0 ^5 e: ?( ~( Y3 ^0 w
Specials;
9 a* D8 b4 L" D; JSpecials random;
9 c. F) b1 b& G+ e! X6 e& j) [  e! OFeatured;
* A" s! f/ p! @! ?( z6 \. Z. ~2 pFeatured random;2 t( q3 U) @$ i( |! Q
Upcoming;
. V! I0 v* J) t* JUpcoming in category;
. X: r; d, d5 F2 bUpcoming random;
' V4 ~7 W1 \8 N- ]Upcoming random in category;
9 _0 \+ Y2 k) n6 o  |News from News & Articles contribution (http://www.zen-cart.com/forum/showthread.php?t=35342).7 [) E( B3 h3 @

7 A7 \2 m* H  S- i) T, G! lParameter "limit" support for all feeds except "random".& B1 h, s1 v6 s' r8 x/ C
) t! l1 @( P7 O  G4 V
Support additional Google Base tags.1 i2 U6 B9 g' X) _7 N! S+ O1 K2 r4 s
% a, X$ q8 _5 e
Add product image and BuyNow button to product description.* h4 l# S; K! v$ p

' z* e6 {9 g! C- G$ yRSS is a powerful marketing tool!
5 V# x) c: i4 ^2 D6 B6 Y+ h9 h$ Y) D5 p
News and Article Manager & Optional Sideboxes/ ?* V; J1 F8 @5 o. R
http://www.zen-cart.com/downloads.php?do=file&id=791
) `6 L$ W: B, U3 a7 ^+ i7 {- U简介:+ V3 ~( e0 i. _7 e# k% B- M. ~' B2 J5 l
The News & Article Manager offers a comprehensive range of functions for adding and managing news, articles and even blog entries, integrated with Zen Cart and with provision for eaily linking to the products in your cart.
* w* h) W, |, q0 r7 h  d) S  N: @+ `. @* J5 G
It was developed for the Zen Cart 1.2.x series and has not been updated since, but the core functions work fine in Zen Cart 1.3.x.3 C7 Q0 M7 R" d( i+ B- U: h

* @, K- s, _& M% m; h* q  WThere are three optional sideboxes. These would need some updating for use in a 1.3.x cart.5 r; ]) K: t2 A% I  m
' m) U4 U. g2 r, `% z6 G! T& z# j
Historically the core package and optional sideboxes were available from www.dream-scape.com - the online home of its author Joshua Dechant. However, this URL is no longer available and so the whole package has been bundled together and made available here.% O5 k9 M# {( O$ T, S
: o( c; L, m8 |' {0 m9 C6 D- V
Unfortunately, the installation instructions and screenshots were hosted at dream-scape.com and appear to have been lost. However, there is an extensive support thread at http://www.zen-cart.com/forum/showthread.php?t=35342/ ^9 y" b' ?1 f- r, Y
Easy Populate with Group Price Per Item
6 f. X- ?3 d% |  Jhttp://www.zen-cart.com/downloads.php?do=file&id=986  y; H2 D) G6 w. ?" u
简介:
8 [2 F; O' \: ^& A  C$ p  A1 I: j% e
This version of Easy Populate has been modified to work with Group Price Per Item version 1.3.2 # U9 a/ u) c9 G0 O4 B
9 s: i* |5 x* ]$ t
Attribute image replaces main product image on sel
/ ~* P2 w& ]7 |* R4 N* C9 k& y- Phttp://www.zen-cart.com/downloads.php?do=file&id=699# b8 \& B" u; n; M) J
简介:+ L' C8 d$ e0 `6 j
This module provides the functionality to get the attribute image in place of main product image when user selects the particular attribute.
# `, D& [! `( r- d  K! N" yThis functionality has a full control through admin. It can made on and off using admin.* n! g+ R' W1 K& n0 D) g
It is very easy to integrate with zen cart.
1 w0 Z7 f7 N9 U& ]6 E! L+ b, U) z3 U6 q" g2 O( F0 @
To use this functionality ,
& f# D- R1 \+ ]0 m. Kcopy this module and run the sql query using admin sql patches. 7 `( U! P) S& u6 _  I
To ON this functionality select the option name in option name manager and put the value 6 in Attribute Style for Radio Buttons/Checkbox:text box.
. ^+ P7 Y9 H) m6 Q; T' d2 T2 o" H! x9 DIt also works for check box and has additional option type Link.
8 l& O! R0 |2 A4 l; L. S6 dIt can be made off by putting value 7 .8 [- Y" D% y/ R/ `( @
Thanks.
1 e5 C8 d  ?/ kWill appreciate responce.
! e7 S% [4 K' g3 M8 AZen Lightbox; Q6 r& [9 B8 O) t( z
http://www.zen-cart.com/downloads.php?do=file&id=1709 h4 K  l2 `  }; ]& M
https://github.com/yellow1912/zencart-jqlightbox/( `! k% K, d0 R/ G
简介:
! ^. @/ V' B- D; c. z- X1 l) R( qThis contribution adds lightbox support to Zen Cart. All large product images will be displayed within a lightbox. This eliminates the need for popup windows and makes your website much more user friendly. Additional product images are displayed within a simple gallery interface.. w+ H0 i& X" |) \

7 g+ Z/ C7 b: C; HAs of v1.5, support for the lightbox effect on any page (including EZ-Pages) and keyboard navigation have been added. In addition to this, the source code has been optimised and the size of the JavaScript code has been reduced by 52.23%.  R, U. [& U' g+ j' t+ E

$ E. r8 u+ K: D% S" ^6 `3 }  TCredit is due to Christophe Beyls for creating Lightbox JS v2, Chris Boylan for his work on the Image Handler 2 support and the Zen Cart Team for creating the best open source ecommerce package available! 3 P/ J* n8 K. I# D' M
Product Info Display (Justified): B0 D" H$ R* m: ]# p4 Y
2 `6 r9 D' i* _5 Z
http://www.zen-cart.com/downloads.php?do=file&id=944. l& b- T5 A7 Z; W9 o6 Q( y
简介:
$ ?7 o4 u2 t4 r% M* a$ [; d, ~# q& B  f) e2 ^
This mod creates fixed column widths for your main product image and description. The product description is justified in the right column. The add to cart button has been moved to just below the price. The price has been given a larger font. Your additional images are centered below both columns.
) m9 r1 _5 _+ Q% Q3 Z3 k% ?! u5 X" r7 a/ c" T* y
A screenshot is included in the zip file.
! t' V0 O; N( P; b& ^0 u* q- f( @: N+ j! P' ~5 B$ r3 I
Additional images relocated with CSS! I) H3 W2 ~3 q) R# I  Y5 C  f
简介:0 U; X: K$ O5 N) }. T$ J
http://www.zen-cart.com/downloads.php?do=file&id=4583 k/ I1 N+ W" `

" `2 U. L, b  M& \) J: mThis contribution relocates additional images below the product main image using CSS, the latest version of Zen Cart files and is XHTML-compliant.& \9 S9 g6 q' r& Q! n. c
Explanations make it very easy to customize the look of the product page.# o# g% Z) Z5 i! n

: r1 F' m. c) |: u* a, fhttp://www.zen-cart.com/forum/showthread.php?t=69672
" c$ r9 ]: x" rImage Handler 2 for v1.3.x! G1 z" z1 x  o1 ~3 A

2 d, ~1 W/ O; T5 w- L. Chttp://www.zen-cart.com/downloads.php?do=file&id=405 R3 o- X( t, [8 ]: b
简介:
2 D- K/ _" I- L' FThis contribution uses GD libraries or ImageMagick (if installed on your server) to generate and resize small, medium and large images on the fly on page request. You can simply upload just one image or you can have different sources for medium and large images. This upgrade further enables you to watermark your images (overlay a second specific translucent image) and have medium images pop up when you move your mouse over a small image (fancy hover).7 d/ w+ u2 f1 i" W

1 A3 A, B& J- u# D" g( BThis contribution includes a powerful admin interface to browse your products just like you would with the Attribute Manager and upload / delete / add additional images without having to do this manually via FTP. Image Handler 2 works fine with mass update utilities like EzPopulate.% w# F4 F. Y4 m3 K' ]8 P7 y
. z1 [9 r( W" B1 t: \; v9 A
为zencart安装jqzoom、jqlightbox、tabbed_products插
7 J- I; r# Y1 j. Z& e9 ^: P  Fhttp://blog.sina.com.cn/s/blog_571296860100fwke.html




欢迎光临 捷飞网络论坛 (http://bbs.fjbjdd.com/) Powered by Discuz! 7.2