Changes added to remove stand alone products creation

This commit is contained in:
vishalsingh.qlo325
2025-05-22 19:16:40 +05:30
parent c240bced67
commit 4d6f17ba04
2 changed files with 22 additions and 22 deletions

View File

@@ -233,7 +233,7 @@
</script>
</div>
{* Code For Standard product working *}
<div class="form-group" id="global_product_type_container">
{* <div class="form-group" id="global_product_type_container">
<label class="control-label col-lg-3" for="selling_preference_type">
<span class="label-tooltip" data-toggle="tooltip" title="{l s='Select whether this product will be sold with room type or as an standalone product'}">
{l s='Product selling preference'}
@@ -247,7 +247,7 @@
<option value="{Product::SELLING_PREFERENCE_STANDALONE}" {if $product->selling_preference_type == Product::SELLING_PREFERENCE_STANDALONE}selected="selected"{/if} >{l s='Sell as standalone product'}</option>
</select>
</div>
</div>
</div> *}
<div class="form-group" id="associated_hotel_tree" {if ($product->selling_preference_type != Product::SELLING_PREFERENCE_HOTEL_STANDALONE && $product->selling_preference_type != Product::SELLING_PREFERENCE_HOTEL_STANDALONE_AND_WITH_ROOM_TYPE)}style="display:none;"{/if}>
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="category_box" type="category_box"}</span></div>
<label class="control-label col-lg-2" for="hotel_block">

View File

@@ -102,8 +102,8 @@ class AdminNormalProductsControllerCore extends AdminController
// 'Seo' => $this->l('SEO'),
'Images' => $this->l('Images'),
'Associations' => $this->l('Associations'),
'Quantities' => $this->l('Quantities'), // Code For Standard product working
'Options' => $this->l('Options'),// Code For Standard product working
// 'Quantities' => $this->l('Quantities'), // Code For Standard product working
// 'Options' => $this->l('Options'),// Code For Standard product working
);
if ($this->context->shop->getContext() != Shop::CONTEXT_GROUP) {
@@ -113,8 +113,8 @@ class AdminNormalProductsControllerCore extends AdminController
// 'Seo' => 2,
'Associations' => 3,
'Images' => 4,
'Quantities' => 5, // Code For Standard product working
'Options' => 6// Code For Standard product working
// 'Quantities' => 5, // Code For Standard product working
// 'Options' => 6// Code For Standard product working
));
}
@@ -213,7 +213,7 @@ class AdminNormalProductsControllerCore extends AdminController
$this->_where .= ' AND a.`booking_product` = 0';
// Code For Standard product working
// $this->_where .= ' AND a.`selling_preference_type` = '.(int)Product::SELLING_PREFERENCE_WITH_ROOM_TYPE;
$this->_where .= ' AND a.`selling_preference_type` = '.(int)Product::SELLING_PREFERENCE_WITH_ROOM_TYPE;
$this->_group = 'GROUP BY a.`id_product`';
@@ -300,19 +300,19 @@ class AdminNormalProductsControllerCore extends AdminController
);
// Code For Standard product working
$sellingPreferenceTypes = array(
Product::SELLING_PREFERENCE_WITH_ROOM_TYPE => $this->l('With room type'),
Product::SELLING_PREFERENCE_HOTEL_STANDALONE_AND_WITH_ROOM_TYPE => $this->l('With hotel|room type'),
Product::SELLING_PREFERENCE_STANDALONE => $this->l('Standalone'),
Product::SELLING_PREFERENCE_HOTEL_STANDALONE => $this->l('With hotel'),
);
$this->fields_list['selling_preference_type'] = array(
'type' => 'select',
'list' => $sellingPreferenceTypes,
'title' => $this->l('Buying option'),
'filter_key' => 'a!selling_preference_type',
'callback' => 'getBuyingOption'
);
// $sellingPreferenceTypes = array(
// Product::SELLING_PREFERENCE_WITH_ROOM_TYPE => $this->l('With room type'),
// Product::SELLING_PREFERENCE_HOTEL_STANDALONE_AND_WITH_ROOM_TYPE => $this->l('With hotel|room type'),
// Product::SELLING_PREFERENCE_STANDALONE => $this->l('Standalone'),
// Product::SELLING_PREFERENCE_HOTEL_STANDALONE => $this->l('With hotel'),
// );
// $this->fields_list['selling_preference_type'] = array(
// 'type' => 'select',
// 'list' => $sellingPreferenceTypes,
// 'title' => $this->l('Buying option'),
// 'filter_key' => 'a!selling_preference_type',
// 'callback' => 'getBuyingOption'
// );
if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_SHOP) {
$this->fields_list['shopname'] = array(
@@ -1890,7 +1890,7 @@ class AdminNormalProductsControllerCore extends AdminController
}
// Code For Standard product working
// $_POST['selling_preference_type'] = Product::SELLING_PREFERENCE_WITH_ROOM_TYPE;
$_POST['selling_preference_type'] = Product::SELLING_PREFERENCE_WITH_ROOM_TYPE;
$this->copyFromPost($this->object, $this->table);
@@ -2038,7 +2038,7 @@ class AdminNormalProductsControllerCore extends AdminController
$product_type_before = $object->getType();
// Code For Standard product working
// $_POST['selling_preference_type'] = Product::SELLING_PREFERENCE_WITH_ROOM_TYPE;
$_POST['selling_preference_type'] = Product::SELLING_PREFERENCE_WITH_ROOM_TYPE;
$this->copyFromPost($object, $this->table);
$object->indexed = 0;