VM 结构
vm的page是页面逻辑部分,template是视图部分,func是业务逻辑部分
可以通过URL的page参数找到对应的page程序,阅读代码可以找到template的准确位置
有关功能性程序,可以跟据页面代码中找到form中的func参数,之后利用后台List Modules功能找到代码。
比如:
1: 从页面的form找到参数,func = orderStatusSet
2: 到后台的List Modules找到与订单相关的order Module
3: 点击order Module的function list,找到记录如下:
Function Name: orderStatusSet
Class Name: ps_order
Class Method: order_status_update
4: 找到ps_order.php,这个是ps_order类的代码,里面能找到方法order_status_update,就是我们要修改的代码部分。
page的位置:
administrator/components/com_virtuemart/html/
template的位置:
com_virtuemart/themes/default/templates/
class的位置:
administrator/components/com_virtuemart/classes/
VM 设置问题
paypal接口调试模式:
后台 > Store > List Payment Methods > PayPal > Configuration
修改为:
$url = "https://www.sandbox.paypal.com/cgi-bin/webscr";
后台的List Modules可以针对几种用户进行功能设置,比如可以把帐户分成管理员与仓库管理员。
VM有子产品概念,可以实现不同属性不同价格。要添加子产品必须先Add Attribute。
VM 模板位置
Featured Products模板:
components/com_virtuemart/themes/default/templates/common/featuredProducts.tpl.php
分页模板:
administrator/components/com_virtuemart/classes/pageNavigation.class.php
产品列表页模板(可添加)
Category Browse Page:
components/com_virtuemart/themes/default/templates/browse/Browse_x.php
产品内容页模板(可添加)
Category Flypage:
components/com_virtuemart/themes/default/templates/product_details/flypage_x.php
components/com_virtuemart/themes/default/theme.php
输出附件缩略图片,不包含原图,flypage_images.tpl依赖于此函数
function vmlistAdditionalImages( $product_id, $images, $title='', $limit=1000 )
产品列表默认次序修改:
23行: administrator/components/com_virtuemart/html/shop_browse_queries.php
VM email
Ask a question about this product
咨询邮件内容(客户):
VM语言包common
VM_ENQUIRY_SHOPPER_EMAIL_MESSAGE
咨询邮件内容(店主):
VM语言包common
VM_ENQUIRY_VENDOR_EMAIL_MESSAGE
咨询邮件模板:
components/com_virtuemart/themes/default/templates/order_emails/enquiry_email.tpl.php
Checkout邮件:
components/com_virtuemart/themes/default/templates/order_emails/confirmation_email.tpl.php
订单更新状态邮件: