Post by Qphoria » Sat Aug 28, 2010 10:25 pm

Hildebrando wrote:Hi:

There is a sample code or simple explanation to work with the new install/uninstall hook?

Qphforia thanx for your work!!

best,

Hilde
Simple. In the admin/controller/module/xxx.php file of your custom extension (could be any module, payment, shipping, total, etc), simply create a function called install() and put some additional code that needs to be executed during install of the module. For example, if your module uses its own database table or column, this is where you could programmatically add it.

Example:

Code: Select all

private function install() {
	$sql = "
		CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "table` (
		`product_id` int(11) NOT NULL default '0',
		`unit_id` int(11) NOT NULL default '0',
		PRIMARY KEY  (`product_id`,`unit_id`)
		) ENGINE=MyISAM DEFAULT CHARSET=utf8";
	$this->db->query($sql);
}
Similarly, create an uninstall() function in that same file and add the code to remove this new table or column and clear out any other data

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Hildebrando » Sat Aug 28, 2010 10:48 pm

Hi Qphoria:

Thanx. I'll work with...

Best,

Hilde

Commercial Contributions:Bulk Specials| Bulk Update Prices|Search Tyre Pro
Free Contributions: Youtube video (oc 1.5.x) | Search History Report (oc 1.5.x) | Product Filter by Category (oc 1.5.x)|Youtube Popup
More Free & commercial mods: www.fpress.com


User avatar
Active Member

Posts

Joined
Fri Mar 06, 2009 8:22 pm
Location - Spain

Post by pedma » Sun Aug 29, 2010 9:47 am

Hi Q, Daniel and others,

Many thanks to all of the coding group .... :)
Nice work, very appreciate ..
I will try it soon ....

Thanks
- pedma -

User avatar
New member

Posts

Joined
Tue Apr 27, 2010 3:06 pm

Post by neamtujose » Sun Aug 29, 2010 8:34 pm

Hello, I am ready to test 1.4.9 version on my site, www.motounelte.com.ro.

Anyway, thank you for your support, it's great.

I am not IT specialist, but with your help I builded my site from 0 "zero".

Thank you again !!!

;D

Newbie

Posts

Joined
Sun Aug 29, 2010 2:11 pm

Post by OCyvon2 » Sun Aug 29, 2010 9:10 pm

Question about language.

When I installed an extra language and set this as default and disable english then in the admin you still have to fill in english for category, products etc.

Only in the shop you can use one language, but in admin you have to use both even when it is disabled. How can I fix this.

OpenCartstore
Gebruikersgids (admin handleiding)


User avatar
Active Member

Posts

Joined
Sun Jan 31, 2010 8:00 pm
Location - Zaandam, The Netherlands

Post by Alekx » Mon Aug 30, 2010 1:09 am

Question about the theme :

Is this version 1.4.9 is compatible with the themes of 1.4.8b?

Thank you

New member

Posts

Joined
Thu Dec 31, 2009 4:07 am

Post by jcr66 » Mon Aug 30, 2010 3:07 am

I have now successfully upgraded to 1.4.9 today but get a warning when I log into opencart admin saying:

warning install folder still exists opencart

Please can you tell me how to remove this?

Thanks
Jim

Newbie

Posts

Joined
Sun Aug 29, 2010 12:33 am

Post by Moggin » Mon Aug 30, 2010 3:29 am

jcr66 wrote:I have now successfully upgraded to 1.4.9 today but get a warning when I log into opencart admin saying:

warning install folder still exists opencart

Please can you tell me how to remove this?

Thanks
Jim
Hi Jim
Just use your FTP client to connect to your site host, and delete the install file, which is in the root of the store:
full_upload_example2.png

full_upload_example2.png (5.39 KiB) Viewed 6836 times


Active Member

Posts

Joined
Wed May 05, 2010 4:56 am

Post by jcr66 » Mon Aug 30, 2010 3:51 am

Thanks Moggin

If you dont ask you dont learn. So many thanks for that and I will now go and delete it.

Regards

Jim

Deleted file and worked a treat thanks.

Newbie

Posts

Joined
Sun Aug 29, 2010 12:33 am

Post by Moggin » Mon Aug 30, 2010 7:46 am

jcr66 wrote:If you dont ask you dont learn.
that's true... glad to help : )

Active Member

Posts

Joined
Wed May 05, 2010 4:56 am

Post by InfiniteDezigns » Mon Aug 30, 2010 8:10 am

I'm having issues with pay pal. Everything is fine with my cart but when I go to checkout on Pay pal I get this message:

This recipient either does not accept payments denominated in <b> or has specified an invalid currency code on his web site. Please contact the seller and ask him either to update his payment receiving preferences to accept this currency or to correct his web site to specify a valid currency code.

Paypal was working fine with the 1.4.2.b and I just updated this to 1.4.9 today. Can someone help as this is my only problem!!!!

New member

Posts

Joined
Mon Jun 21, 2010 5:18 am

Post by Qphoria » Mon Aug 30, 2010 8:27 am

InfiniteDezigns wrote:I'm having issues with pay pal. Everything is fine with my cart but when I go to checkout on Pay pal I get this message:

This recipient either does not accept payments denominated in <b> or has specified an invalid currency code on his web site. Please contact the seller and ask him either to update his payment receiving preferences to accept this currency or to correct his web site to specify a valid currency code.

Paypal was working fine with the 1.4.2.b and I just updated this to 1.4.9 today. Can someone help as this is my only problem!!!!

It is likely that you are using a 1.4.8 theme that was created improperly and doesn't have the new paypal tpl file in it. Remove the pp_standard.tpl file from catalog/view/theme/YOURTHEME/template/payment/pp_standard.tpl

By removing it, it will default back to the one that is in the "default" folder, which has the correct fields

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by aicdigital » Mon Aug 30, 2010 8:35 am

Flawless .. Thanks Q .. Updated in 15 minutes no problem at all.
AIC INCORPORATED www.asktp.com is now running QC1.4.9 - even with the modified ProShop template !!!!

Awesome work!!!

Newbie

Posts

Joined
Wed May 12, 2010 4:08 am

Post by Xsecrets » Mon Aug 30, 2010 9:12 am

aicdigital wrote:Flawless .. Thanks Q .. Updated in 15 minutes no problem at all.
AIC INCORPORATED http://www.asktp.com is now running QC1.4.9 - even with the modified ProShop template !!!!

Awesome work!!!
wow I went there to check it out and closed the tab after about 2 minutes and the site hadn't come up. You may seriously want to look into getting a new host.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by datacon » Mon Aug 30, 2010 9:46 am

Could the DEMO of opencart please be updated to latest version to test admin side?

Thanks

http://demo.opencart.com

New member

Posts

Joined
Tue Nov 17, 2009 11:10 am

Post by welehweleh » Mon Aug 30, 2010 12:08 pm

woww.. im try it.. thanks for all oc mania..
:D

User avatar
Newbie

Posts

Joined
Wed Aug 25, 2010 10:57 am

Post by opencartArab » Mon Aug 30, 2010 12:51 pm

Alekx wrote:Question about the theme :

Is this version 1.4.9 is compatible with the themes of 1.4.8b?

Thank you
NOTES:
- No changes should be needed for most third party Extensions. Most extensions that worked for 1.4.8/1.4.8b should work for 1.4.9 without change.

https://www.opencartarab.com
التعليمات باللغة العربية موجودة على الرابط التالي
https://www.opencartarab.com/docs


Expert Member

Posts

Joined
Thu Apr 01, 2010 3:31 am

Post by Qphoria » Mon Aug 30, 2010 12:58 pm

opencartArab wrote:
Alekx wrote:Question about the theme :

Is this version 1.4.9 is compatible with the themes of 1.4.8b?

Thank you
NOTES:
- No changes should be needed for most third party Extensions. Most extensions that worked for 1.4.8/1.4.8b should work for 1.4.9 without change.
I will qualify that however, only themes that were correctly made based on the 2 golden rules here:
http://www.opencart.com/index.php?route ... path=43_44

Unfortunately most themes weren't made correctly and were made by copying and pasting the entire default theme directory so they don't use the override system. You will likely run into problems with paypal and other issues because of it if this is the case

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by mbaldock2001 » Mon Aug 30, 2010 7:56 pm

[EDIT: (re)moved from 1.4.9 bug list posts]

Hi,
A small issue, but have searched and not found any results for this elsewhere.

It appears that catalog\model\localisation\packaging.php has been removed from 1.4.9

Could someone confirm this?

Many, many thanks to all involved in development of OC1.4.9..
Mark

OC v1.4.9.1
(dev:)WampServer v2.0: Apache 2.2.11, PHP 5.3.0, MySQL 5.1.36
(prod:) Apache , PHP 2.10.0.2, MySQL 5.1.37


Newbie

Posts

Joined
Sun Mar 14, 2010 3:27 am
Location - Paris, France

Post by Xsecrets » Mon Aug 30, 2010 8:36 pm

mbaldock2001 wrote:[EDIT: (re)moved from 1.4.9 bug list posts]

Hi,
A small issue, but have searched and not found any results for this elsewhere.

It appears that catalog\model\localisation\packaging.php has been removed from 1.4.9

Could someone confirm this?

Many, many thanks to all involved in development of OC1.4.9..
Mark
looks like that was removed in 1.4.8

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US
Who is online

Users browsing this forum: No registered users and 17 guests