简体   繁体   English

Joomla 1.1中的Virtuemart数据库连接

[英]Virtuemart database connection in Joomla 1.1

I'm modifying the Product Form to add in a field that allows a tagline for products. 我正在修改产品表单,以在允许产品标语的字段中添加。 In the database, I've created a new field in the jos_vm_product table and added an entry in the $fields array in the ps.product.php file. 在数据库中,我在jos_vm_product表中创建了一个新字段,并在ps.product.php文件的$ fields数组中添加了一个条目。

In my product.product_form.php file I've used this code to insert the tagline into the database: 在我的product.product_form.php文件中,我使用以下代码将标语插入数据库:

<textarea class="inputbox" name="product_tagline" id="product_tagline" cols="35" rows="4" ><?php echo $db->sf("product_tagline"); ?></textarea> 

And the problem that is occurring is the db field is not being populated nor are there any error messages. 发生的问题是未填充db字段,也没有任何错误消息。

Thanks in advance for any help. 在此先感谢您的帮助。

Seems like you forgot to modify the model. 好像您忘记修改模型。

Model for the product table is located in admin section 产品表的型号位于管理部分

/administrator/components/com_virtuemart/classes/ps_product.php /administrator/components/com_virtuemart/classes/ps_product.php

Modify two functions add() and update(). 修改两个函数add()和update()。 Make sure the product_tagline is included in the SQL statement. 确保product_tagline包含在SQL语句中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM