Misc fixes from live site

This commit is contained in:
Deon George
2013-07-05 16:11:37 +10:00
parent 3499776ddc
commit f3d2c1fe8d
21 changed files with 80 additions and 65 deletions

View File

@@ -113,9 +113,9 @@ class Model_Product extends ORM_OSB {
if ($x = array_diff_key($_POST,$this->_object) AND ! empty($_POST['language_id']) AND ! empty($_POST['product_translate']) AND is_array($_POST['product_translate'])) {
$pto = $this->product_translate->where('language_id','=',$_POST['language_id'])->find();
// For a new entry, we need to set the product_cat_id
// For a new entry, we need to set the product_id
if (! $pto->loaded()) {
$pto->product_cat_id = $this->id;
$pto->product_id = $this->id;
$pto->language_id = $_POST['language_id'];
}

View File

@@ -10,6 +10,7 @@
* @license http://dev.osbill.net/license.html
*/
class Model_Product_Translate extends ORM_OSB {
protected $_created_column = FALSE;
protected $_updated_column = FALSE;
protected $_belongs_to = array(