Page 1 of 1

How to disable "*Model" product opencart 2.2.0.0?

Posted: Sat Dec 31, 2016 4:10 pm
by rycream
Can you help me turn off *Model ? Thanks you so much!

Re: How to disable "*Model" product opencart 2.2.0.0?

Posted: Mon Jan 02, 2017 7:49 am
by IP_CAM
I used this Extensions, and added a section, removing the Model Code, displayed in the Product Section also, and it so seems to work well in my Test clerkscart OC v.2.2.6 Version. You don't need any of the other (empty) Files, placed in the original Extension,
just copy/paste and install the no_model.ocmod.xml shown below, by use of the OC Extension Installer.
Good Luck ;)
Ernie
---
No Model
This ocmod will remove the verification performed on the model field when creating a product so you don't have to specify a model code.
https://www.opencart.com/index.php?rout ... n_id=25426
---
no_model.ocmod.xml

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<modification>
<code><![CDATA[35151065]]></code>
<name><![CDATA[Not required Model in Admin + Product]]></name>
<version><![CDATA[1.0]]></version>
<author><![CDATA[Snake Studios - IP_CAM]]></author>

<file path="admin/view/template/catalog/product_form.tpl">
<operation error="log">
<search index="2"><![CDATA[<div class="form-group required">]]></search>
<add position="replace"><![CDATA[<div class="form-group">]]></add>
</operation>

<operation error="log">
<search><![CDATA[<?php if ($error_model) { ?>]]></search>
<add position="replace"><![CDATA[]]></add>
</operation>

<operation error="log">
<search><![CDATA[<div class="text-danger"><?php echo $error_model; ?></div>]]></search>
<add position="replace"><![CDATA[]]></add>
</operation>

<operation error="log">
<search index="6"><![CDATA[<?php } ?>]]></search>
<add position="replace"><![CDATA[]]></add>
</operation>
</file>

<file path="admin/controller/catalog/product.php">
<operation error="log">
<search><![CDATA[if ((utf8_strlen($this->request->post['model']) < 1) || (utf8_strlen($this->request->post['model']) > 64)) {]]></search>
<add position="replace"><![CDATA[]]></add>
</operation>

<operation error="log">
<search><![CDATA[$this->error['model'] = $this->language->get('error_model');]]></search>
<add position="replace"><![CDATA[]]></add>
</operation>

<operation error="log">
<search index="276"><![CDATA[}]]></search>
<add position="replace"><![CDATA[]]></add>
</operation>
</file>
	
<file path="catalog/view/theme/*/template/product/product.tpl">
<operation error="log">
<search><![CDATA[<li><?php echo $text_model; ?> <?php echo $model; ?></li>]]></search>
<add position="replace"><![CDATA[]]></add>
</operation>
</file>
	
</modification>

Re: How to disable "*Model" product opencart 2.2.0.0?

Posted: Thu Jan 05, 2017 2:03 am
by rycream
Error, It help Model no Require but my Vertical Menu not process :(
_______________________
Disable Model Opencart 2.2, turn off model opencart 2.2