Post by rycream » Sat Dec 31, 2016 4:10 pm

Can you help me turn off *Model ? Thanks you so much!

Attachments

Capture.PNG

Capture.PNG (23.34 KiB) Viewed 1493 times


Newbie

Posts

Joined
Sat Dec 31, 2016 4:04 pm

Post by IP_CAM » Mon Jan 02, 2017 7:49 am

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>

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by rycream » Thu Jan 05, 2017 2:03 am

Error, It help Model no Require but my Vertical Menu not process :(
_______________________
Disable Model Opencart 2.2, turn off model opencart 2.2

Attachments

Disable Model Opencart 2.2


Newbie

Posts

Joined
Sat Dec 31, 2016 4:04 pm
Who is online

Users browsing this forum: No registered users and 4 guests