- Posts: 78
- Thank you received: 1
How to Publish products by default
- adeptdesigns
-
Topic Author
- Offline
Less
More
11 years 2 months ago #209910
by adeptdesigns
How to Publish products by default was created by adeptdesigns
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.5.23
-- Browser(s) name and version -- : Firefox 39.0
-- Error-message(debug-mod must be tuned on) -- : none
Hello,
By default, new products are "unpublished". Is there a way to set all new products to "Published" by default? I don't see any options for this in the config.
Thank you,
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.5.23
-- Browser(s) name and version -- : Firefox 39.0
-- Error-message(debug-mod must be tuned on) -- : none
Hello,
By default, new products are "unpublished". Is there a way to set all new products to "Published" by default? I don't see any options for this in the config.
Thank you,
Please Log in or Create an account to join the conversation.
11 years 2 months ago #209912
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic How to Publish products by default
Hi,
We already have a patch for the next version.
Please edit the file "administrator/components/com_hikashop/views/product/view.html.php" and replace
By
And it will force some elements during the product creation.
Regards,
We already have a patch for the next version.
Please edit the file "administrator/components/com_hikashop/views/product/view.html.php" and replace
Code:
}
if(empty($product_id) && empty($product->categories)) {
Code:
} else {
$product->product_quantity = -1;
$product->product_published = 1;
$categoryClass = hikashop_get('class.category');
$mainTaxCategory = 'tax';
$categoryClass->getMainElement($mainTaxCategory);
$query = 'SELECT category_id FROM '. hikashop_table('category'). ' WHERE category_type = ' . $db->Quote('tax') . ' AND category_parent_id = '.(int)$mainTaxCategory.' ORDER BY category_ordering DESC';
$db->setQuery($query);
$product->product_tax_id = $db->loadResult();
}
if(empty($product_id) && empty($product->categories)) {
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: adeptdesigns
Please Log in or Create an account to join the conversation.
Time to create page: 0.144 seconds