vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Mini Mods - vBDiscounts - Give subscription discounts to your members! (https://vborg.vbsupport.ru/showthread.php?t=211544)

MichaelDance 05-08-2010 09:55 PM

Quote:

Originally Posted by RichieBoy67 (Post 1972788)
Does anyone actually have this working??

I have it installed for a client and all the templates are ok but discounts are not going through to PayPal once a member is redirected there..

Thanks

I have almost the same problem, i charge ?4 per month VIP and the discount ment to discount ?2 but no its not taken off the costs even though it states its updated the prices. :l

Premiumkenti 09-01-2015 02:27 AM

Database error in vBulletin 3.8.8:

Invalid SQL:

CREATE TABLE IF NOT EXISTS `coupons` (
`couponid` int(10) unsigned NOT NULL auto_increment,
`couponname` varchar(50) NOT NULL default '',
`couponvalue` int(3) unsigned NOT NULL default '0',
`couponvalidfrom` DATE,
`couponvalidto` DATE,
PRIMARY KEY (`couponid`)
) TYPE=MyISAM;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 8
Error Number : 1064
Request Date : Tuesday, September 1st 2015 @ 04:27:39 AM
Error Date : Tuesday, September 1st 2015 @ 04:27:39 AM
Script : http://www.premiumkenti.com/gizlicp/...=productimport
Referrer : http://www.premiumkenti.com/gizlicp/...?do=productadd
IP Address : REMOVED
Username : REMOVED
Classname : vB_Database
MySQL Version : 5.5.42-cll

TheLastSuperman 09-01-2015 09:18 PM

Quote:

Originally Posted by Premiumkenti (Post 2554003)
Database error in vBulletin 3.8.8:

Invalid SQL:

CREATE TABLE IF NOT EXISTS `coupons` (
`couponid` int(10) unsigned NOT NULL auto_increment,
`couponname` varchar(50) NOT NULL default '',
`couponvalue` int(3) unsigned NOT NULL default '0',
`couponvalidfrom` DATE,
`couponvalidto` DATE,
PRIMARY KEY (`couponid`)
) TYPE=MyISAM;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 8
Error Number : 1064
Request Date : Tuesday, September 1st 2015 @ 04:27:39 AM
Error Date : Tuesday, September 1st 2015 @ 04:27:39 AM
Script : http://www.premiumkenti.com/gizlicp/...=productimport
Referrer : http://www.premiumkenti.com/gizlicp/...?do=productadd
IP Address : REMOVED
Username : REMOVED
Classname : vB_Database
MySQL Version : 5.5.42-cll

I removed your username and IP address form this error message, never post your IP - simply edit and remove ;).

Also please do not report a modification thread unless its a security risk, a general error is not deemed a report worthy.... umm report!

Edit: Ignore the below strike through notes, I left them for reference purposes only. Instead of doing the below edit, simply download the file "product-vbdiscountsTYPE-OR-ENGINE-MySQL-Fix.xml " and install that XML file instead of the one included, this willnew version will check to see what mysql version you're on and assign type or engine accordingly. I took the original file and edited for those who do not know how. *This is NOT required unless you have an error identical to Premiumkenti's issue above.

[S]On a side note, seems the .xml needs to be edited, edit the .xml file with Notepad++ (Google it and download and install that program to edit, DO NOT USE Windows Notepad/Wordpad it can cause issues) and find this in the file:
Code:

TYPE=MyISAM;
Change to:
Code:

ENGINE=MyISAM;
Save the .xml file, now install the mod and done :cool:.[/S]

TheLastSuperman 09-02-2015 05:45 PM

Updated once more, the fixed file "product-vbdiscountsTYPE-OR-ENGINE-MySQL-Fix.xml" now checks your mysql version and assigns TYPE or ENGINE accordingly :cool:.

Example:
PHP Code:

// Check for TYPE or ENGINE based on version from what I read it was still in 5.1.45 fully but only partially there afterwords - TheLastSuperman
    
$mysql_version $db->query_first("SELECT version() AS version");
    
define('MYSQL_VERSION'$mysql_version['version']);
    
$type_or_engine = (version_compare(MYSQL_VERSION'5.1.45''<')) ? 'TYPE' 'ENGINE';
    
$vbulletin->db->query_write("
CREATE TABLE IF NOT EXISTS `"
TABLE_PREFIX ."discounts` (
  `discountid` int(10) unsigned NOT NULL auto_increment,
  `discountname` varchar(50) NOT NULL default '',
  `discountvalue` int(3) unsigned NOT NULL default '0',
  `discountvalidfrom` DATE,
  `discountvalidto` DATE,
  PRIMARY KEY  (`discountid`)
$type_or_engine=MyISAM
"
); 



All times are GMT. The time now is 01:37 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01249 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete