In queries.log there is no table inserts on the table ... Table mdr_item_archive however has: "select_1\":0,\"selectedCategoryId\":294,\"keywordMapping\":\'jas:294\",\"countryId\":\"be\",\".......... etc....
keywordmapping is what needs to be in in keyword and category colums from table keyword_category_mapping. Shouldn't this be more specific like "keywordMapping\":\"keyword: jas: category 294\",\" ?
Payload in console after posting:
octoken: llhx4gaxmimg
action: item_add_post
page: item
sKeyword: jas
foundCategory: 294
catId: 294
select_1: 0
selectedCategoryId: 294
keywordMapping: jas:294
octoken: llhx4gaxmimg
Params to model in item-post after validate (end of page):
contactEmail: {
required: '<?php echo osc_esc_js(__('Email: this field is required.', 'epsilon')); ?>',
email: '<?php echo osc_esc_js(__('Email: invalid format of email address.', 'epsilon')); ?>'
}
},
ignore: ":disabled",
ignoreTitle: false,
errorLabelContainer: "#error_list",
wrapper: "li",
invalidHandler: function(form, validator) {
$('html,body').animate({ scrollTop: $('body').offset().top}, { duration: 250, easing: 'swing'});
},
submitHandler: function(form){
$('button[type=submit], input[type=submit]').attr('disabled', 'disabled');
form.submit();
}
});
});
// Code to save keyword and id into database
if (Params::existParam('keywordMapping')) {
$keywordMapping = Params::getParam('keywordMapping');
if (!empty($keywordMapping)) {
list($keyword, $catId) = explode(':', $keywordMapping);
ModelEPS::newInstance()->saveCategoryMapping($keyword, $catId);
}
}
</script>
<?php osc_current_web_theme_path('footer.php'); ?>
</body>
</html>
Witch i guess is not activating the modelEPS function... Maybe this should be in functions instead of item-post after validating code....