Post by Qphoria » Tue Dec 02, 2008 5:35 am

Code: Select all

What Does This Contrib Do?
This contrib adds the ability to duplicate items with a single button click. See the supported sections area for supported items

Supported Sections:
	•	Products 
		o	Options
		o	Discounts
		o	Categories
		o	Languages
		o	Images
		o	Downloads
	•	Categories
		o	Images
		o	Languages (if category_description contrib is installed)

Features:
	•	New duplicate button on the list page
	•	Javascript confirmation for duplicate
	•	Language file support for button alt text and optional use of automatic number suffix
		(i.e Product 1 -> Product 1(1), Product 1(2), etc)
	•	Added column_id to the list page to easily see the id

Demo(login: demo/demo)
Download
Last edited by Qphoria on Tue Dec 02, 2008 5:39 am, edited 1 time in total.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by djbrock » Tue Dec 09, 2008 4:34 am

Fatal error: Call to undefined method Request::gethtml() in /home/xxxxxxx/public_html/xxxxxxxxxx/ocstore/admin/controller/product.php on line 176

is the error I get when I try to duplicate something. This occurs after clicking the OK button.  I've uploaded the Dec. 7 version but it didn't change anything. 

Also, is there SQL? It isn't included in the downloads.

New member

Posts

Joined
Thu Dec 04, 2008 10:37 pm

Post by Qphoria » Tue Dec 09, 2008 4:50 am

Are you using the latest 0.7.9 version of OpenCart (as the readme states  ;)) ?

There is no sql. Just drop in and its ready
Last edited by Qphoria on Tue Dec 09, 2008 4:54 am, edited 1 time in total.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by djbrock » Tue Dec 09, 2008 5:04 am

Yes. I upgraded from .7.8 a few days ago.

The same error occurs now, also, when I try to edit the item's info.
Last edited by djbrock on Tue Dec 09, 2008 5:24 am, edited 1 time in total.

New member

Posts

Joined
Thu Dec 04, 2008 10:37 pm

Post by Qphoria » Tue Dec 09, 2008 5:33 am

check your library/environment/request.php file and search for the function:

function gethtml($key, $type = 'GET', $default = NULL) {

Does that exist?

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by djbrock » Tue Dec 09, 2008 5:47 am

It is not in there.

New member

Posts

Joined
Thu Dec 04, 2008 10:37 pm

Post by Qphoria » Tue Dec 09, 2008 5:53 am

Then you did not upgrade from 0.7.8 to 0.7.9 properly. That needs to occur first. Please read the readme for the install. You need to upload all the new files, not just run the upgrade script



I went ahead and tried upgrading from 078 to 079 and then installing the mod and it is working fine.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by djbrock » Tue Dec 09, 2008 5:58 am

When I copied the PHP file from the download it worked just fine. You're right, something didn't work just right in the upgrade process.

New member

Posts

Joined
Thu Dec 04, 2008 10:37 pm

Post by jty » Wed Dec 10, 2008 5:19 am

Qphoria wrote: There is no sql. Just drop in and its ready
You left the SQL bit in the readme.rtf
Cut 'n Paste strikes again  ;)

I have it working on 0.7.9RC3 by doing a global replace of gethtml to just get

Question: Is there an easy way to make it jump into edit mode after the clone is created instead of back to the product list page ?
Or am I asking for too much agaaaain  :P

It works beautifully. I nominate this one for 0.8
Thank-you  :-*
Last edited by jty on Wed Dec 10, 2008 6:10 am, edited 1 time in total.

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am

Post by Qphoria » Wed Dec 10, 2008 5:34 am

yea i saw the sql thing.. its fixed in my copy :)

gethtml to just html?? you mean just "get"

Yea i was wondering if edit mode would be best too.

Simple fix.
edit admin/controller/product.php around line 234:

CHANGE:

Code: Select all

$response->redirect($url->ssl('product'));
TO:

Code: Select all

$response->redirect($url->ssl('product', 'update', array('product_id' => $insert_id)));

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by jty » Wed Dec 10, 2008 6:09 am

Qphoria wrote: gethtml to just html?? you mean just "get"
LOL. You know what I mean. I haven't slept for a few months. Burning the midnight candle learning php and breaking Open Cart.
I'd better fix my post above in case someone trusts me  8)

Thanks for the edit mode
I've done about 20 products in a live environment and this contribution is a great little gem

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am
Who is online

Users browsing this forum: No registered users and 5 guests