Post by psytanium » Fri Jan 18, 2019 3:55 am

Hello,

I have an extension (Quick Update) when installed it overwrite the original product editing page in Admin, and another extension to export products to csv. Im not able to combine the 2 extensions on the same template.

Im using Opencart 2.3.0.2

I want to duplicate the product page, this way Ill have the export csv on 1 page, and Quick Update on another.

Step 1

I duplicated the file admin/conteroller/catalog/product.php

Changed its name to product1.php
Changed the class name to ControllerCatalogProduct1
Changed every catalog/product to catalog/product1

Step 2

I duplicated the file admin/language/en-gb/catalog/product.php

Changed its name to product1.php
I don't know if this is a necessary step

Step 3

I duplicated the file admin/model/catalog/product.php

Changed its name to product1.php
Changed the class name to ModelCatalogProduct1

Step 4

I duplicated the file admin/view/template/catalog/product.tpl

Changed its name to product1.tpl
Changed

From

var url = 'index.php?route=catalog/product&token=<?php echo $token; ?>';

To

var url = 'index.php?route=catalog/product1&token=<?php echo $token; ?>';

Step 5

Now I added the new product template to the left column menu and gave permission to the user group.

When I open the page, it's blank. Any help ? Thanks :)

Active Member

Posts

Joined
Fri Nov 27, 2015 2:07 am

Post by straightlight » Fri Jan 18, 2019 6:30 pm

Rather than going through all these steps, better to create a new module file aside so not to modify product template files from the admin core. ;)

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by psytanium » Sat Jan 19, 2019 4:31 am

straightlight wrote:
Fri Jan 18, 2019 6:30 pm
Rather than going through all these steps, better to create a new module file aside so not to modify product template files from the admin core. ;)
This is what I'm trying to do, i didn't modified the files in admin, but duplicate it. After I duplicate catalog/product controller and model and template. I have blank page.

is the procedure I'm doing fine ? Usually how do you duplicate / create new template.

Thanks :)

Active Member

Posts

Joined
Fri Nov 27, 2015 2:07 am

Post by DigitCart » Sat Jan 19, 2019 12:06 pm

Hi
in this file:
admin\controller\catalog\product1.php

Find all:

Code: Select all

model_catalog_product
Replace with:

Code: Select all

model_catalog_product1

My Extensions


User avatar
Active Member

Posts

Joined
Thu Jun 22, 2017 5:32 pm


Post by psytanium » Sat Jan 19, 2019 7:24 pm

DigitCart wrote:
Sat Jan 19, 2019 12:06 pm
Hi
in this file:
admin\controller\catalog\product1.php

Find all:

Code: Select all

model_catalog_product
Replace with:

Code: Select all

model_catalog_product1
It worked, but with some errors, now i can work around. Big thanks anyway, btw you thibnk I should duplicate product_form.tpl ?

Active Member

Posts

Joined
Fri Nov 27, 2015 2:07 am
Who is online

Users browsing this forum: No registered users and 18 guests