kizocart wrote: ↑Mon Oct 28, 2019 1:11 pm
but , some times this problem come especially if you are using another language for admin panel (not English) in this case check
Settings ---> localization ---> stock id
if there are translations for it or no
if not just hit + icon and add
in stock
out of stock
2-3 days
pre-order
I see your point. That would be correct. There seem to be missing validations, even in OC v3.0.3.2 release that may need to be addressed when validating recurring products from the admin catalog products page whenever a language may of may not have been defined from the settings - > localisation - > stock ID since the admin catalog products page also contains the stock status ID where this field links with a language ID that, yet, needs to be ensured to be configured before officially saving the product.
To solved this issue, I have attached the three files that now validates 95% of the associations with other features on the database:
- admin/controller/catalog/product.php
- admin/language/en-gb/catalog/product.php
for v3.0.3.2 release. To those who are using a lower OC version, feel free to compare.
As for the: admin/view/template/catalog/product_form.twig, here it is:
Code: Select all
<div class="container-fluid"> {% if error_warning %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">×</button>
</div>
{% endif %}
{% if error_language %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_language }}
<button type="button" class="close" data-dismiss="alert">×</button>
</div>
{% endif %}
{% if error_product_recurring_description %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_product_recurring_description }}
<button type="button" class="close" data-dismiss="alert">×</button>
</div>
{% endif %}
{% if error_product_stock_status_description %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_product_stock_status_description }}
<button type="button" class="close" data-dismiss="alert">×</button>
</div>
{% endif %}
{% if error_product_attribute_description %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_product_attribute_description }}
<button type="button" class="close" data-dismiss="alert">×</button>
</div>
{% endif %}
{% if error_product_filter %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_product_filter }}
<button type="button" class="close" data-dismiss="alert">×</button>
</div>
{% endif %}
{% if error_product_filter_description %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_product_filter_description }}
<button type="button" class="close" data-dismiss="alert">×</button>
</div>
{% endif %}
{% if error_product_option_description %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_product_option_description }}
<button type="button" class="close" data-dismiss="alert">×</button>
</div>
{% endif %}
{% if error_product_value_description %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_product_value_description }}
<button type="button" class="close" data-dismiss="alert">×</button>
</div>
{% endif %}
{% if error_product_reward_description %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_product_reward_description }}
<button type="button" class="close" data-dismiss="alert">×</button>
</div>
{% endif %}
{% if error_product_download_description %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_product_download_description }}
<button type="button" class="close" data-dismiss="alert">×</button>
</div>
{% endif %}
{% if error_product_layout_description %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_product_layout_description }}
<button type="button" class="close" data-dismiss="alert">×</button>
</div>
{% endif %}
{% if error_product_store %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_product_store }}
<button type="button" class="close" data-dismiss="alert">×</button>
</div>
{% endif %}
...
and so on. The rest of the TWIG file, either before or after, don't need to be modified in this case. The first line of this TWIG file is where it
needs to be looked before adding the extra lines below.