[TH] Credits: Shop [Deleted]

Just one error for me,

#1091 - Can't DROP 'max_active_purchases '; check that column/key exists
 
You can ignore any messages saying that the column doesn't exist, because if it doesn't exist it doesn't need to be dropped. Probably should have stated that in the e-mail, but it doesn't really matter I suppose. Check through the tables and make sure they don't exist just to be sure, and if they do remove them with the delete button in phpMyAdmin then run the update XML and you should be good to go, if not just let me know and I'll take a closer look at it.
 
And one more in error logs,

Code:
Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Unknown column 'product.display_on_profile_inventory' in 'field list' - library/Zend/Db/Statement/Mysqli.php:77
Generated By: Unknown Account, 32 minutes ago

Code:
#0 /var/www/vhosts/wweforums.net/httpdocs/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('\n\t\t\tSELECT purc...')
#1 /var/www/vhosts/wweforums.net/httpdocs/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '\n\t\t\tSELECT purc...')
#2 /var/www/vhosts/wweforums.net/httpdocs/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('\n\t\t\tSELECT purc...')
#3 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model.php(219): Zend_Db_Adapter_Abstract->query('\n\t\t\tSELECT purc...', Array, 2)
#4 /var/www/vhosts/wweforums.net/httpdocs/library/Audentio/Credit/Shop/Model/ProductPurchase.php(56): XenForo_Model->fetchAllKeyed('\n\t\t\tSELECT purc...', 'purchase_id', Array)
#5 /var/www/vhosts/wweforums.net/httpdocs/library/Audentio/Credit/Shop/CronEntry/ExpireProduct.php(12): Audentio_Credit_Shop_Model_ProductPurchase->getExpiredPurchases(Array)
#6 [internal function]: Audentio_Credit_Shop_CronEntry_ExpireProduct::run(Array)
#7 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/Cron.php(357): call_user_func(Array, Array)
#8 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Deferred/Cron.php(24): XenForo_Model_Cron->runEntry(Array)
#9 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/Deferred.php(294): XenForo_Deferred_Cron->execute(Array, Array, 7.9999969005585, '')
#10 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/Deferred.php(428): XenForo_Model_Deferred->runDeferred(Array, 7.9999969005585, '', false)
#11 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/Deferred.php(373): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#12 /var/www/vhosts/wweforums.net/httpdocs/deferred.php(23): XenForo_Model_Deferred->run(false)
#13 {main}
 
That's odd, must be something with a previous botched install as when I tested it worked fine. Run this query:

Code:
ALTER TABLE `adcredit_shop_product` ADD `
display_on_profile_inventory
` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `display_on_profile_view`;
 
#1166 - Incorrect column name '
display_on_profile_inventory
'
Dropped the max_active_purchases table too, now this on install,

Mysqli statement execute error : Duplicate column name 'quantity'
 
Oh, the stack trace. Notice the conversation essentials line too,

Code:
#0 /var/www/vhosts/wweforums.net/httpdocs/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /var/www/vhosts/wweforums.net/httpdocs/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /var/www/vhosts/wweforums.net/httpdocs/library/Audentio/Credit/Shop/Listener/Install/1000301.php(22): Zend_Db_Adapter_Abstract->query('ALTER TABLE `ad...')
#3 /var/www/vhosts/wweforums.net/httpdocs/library/Audentio/Credit/Shop/Listener/Install.php(28): Audentio_Credit_Shop_Listener_Install_1000301::run(1000270)
#4 [internal function]: Audentio_Credit_Shop_Listener_Install::run(Array, Array, Object(SimpleXMLElement))
#5 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/AddOn.php(215): call_user_func(Array, Array, Array, Object(SimpleXMLElement))
#6 /var/www/vhosts/wweforums.net/httpdocs/library/ConvEss/Model/AddOn.php(24): XenForo_Model_AddOn->installAddOnXml(Object(SimpleXMLElement), 'adcredit_shop')
#7 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/AddOn.php(169): ConvEss_Model_AddOn->installAddOnXml(Object(SimpleXMLElement), 'adcredit_shop')
#8 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/ControllerAdmin/AddOn.php(236): XenForo_Model_AddOn->installAddOnXmlFromFile('/tmp/phpMd2uaE', 'adcredit_shop')
#9 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/FrontController.php(347): XenForo_ControllerAdmin_AddOn->actionUpgrade()
#10 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#11 /var/www/vhosts/wweforums.net/httpdocs/admin.php(13): XenForo_FrontController->run()
#12 {main}
 
Can you add a feature for a pre-purchase callback? So let's say I want to buy the product "Custom User Title", it calls a custom function I could define to check if that user has over 1,000 posts or something, or maybe is also a user in a separate database. If it turns false, they are unable to purchase the product.
 
Oh, the stack trace. Notice the conversation essentials line too,

Code:
#0 /var/www/vhosts/wweforums.net/httpdocs/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /var/www/vhosts/wweforums.net/httpdocs/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /var/www/vhosts/wweforums.net/httpdocs/library/Audentio/Credit/Shop/Listener/Install/1000301.php(22): Zend_Db_Adapter_Abstract->query('ALTER TABLE `ad...')
#3 /var/www/vhosts/wweforums.net/httpdocs/library/Audentio/Credit/Shop/Listener/Install.php(28): Audentio_Credit_Shop_Listener_Install_1000301::run(1000270)
#4 [internal function]: Audentio_Credit_Shop_Listener_Install::run(Array, Array, Object(SimpleXMLElement))
#5 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/AddOn.php(215): call_user_func(Array, Array, Array, Object(SimpleXMLElement))
#6 /var/www/vhosts/wweforums.net/httpdocs/library/ConvEss/Model/AddOn.php(24): XenForo_Model_AddOn->installAddOnXml(Object(SimpleXMLElement), 'adcredit_shop')
#7 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/AddOn.php(169): ConvEss_Model_AddOn->installAddOnXml(Object(SimpleXMLElement), 'adcredit_shop')
#8 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/ControllerAdmin/AddOn.php(236): XenForo_Model_AddOn->installAddOnXmlFromFile('/tmp/phpMd2uaE', 'adcredit_shop')
#9 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/FrontController.php(347): XenForo_ControllerAdmin_AddOn->actionUpgrade()
#10 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#11 /var/www/vhosts/wweforums.net/httpdocs/admin.php(13): XenForo_FrontController->run()
#12 {main}

Most likely not a conflict, in library/Audentio/Credit/Shop/Listener/Install/100301.php comment out/delete the following lines:

Code:
        "ALTER TABLE `adcredit_shop_product` ADD `max_active_purchases` INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER `purchases`;",
        "ALTER TABLE `adcredit_shop_product` ADD `quantity` INT(11) NOT NULL DEFAULT '-1' AFTER `max_active_purchases`;",
        "ALTER TABLE `adcredit_shop_product` ADD `giftable` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `active`;",
        "ALTER TABLE `adcredit_shop_category` ADD `active` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1' ;",
        "ALTER TABLE `adcredit_shop_product` ADD `display_on_postbit` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `active`;",
        "ALTER TABLE `adcredit_shop_product` ADD `display_on_profile_view` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `display_on_postbit`;",
        "ALTER TABLE `adcredit_shop_product` ADD `display_on_profile_inventory` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `display_on_postbit`;",
        "ALTER TABLE `xf_user` ADD `adcredit_shop_postbit_icons` BLOB NOT NULL ;",
        "ALTER TABLE `xf_user` ADD `adcredit_shop_profile_icons` BLOB NOT NULL ;",

then run the update XML and run those queries manually via phpMyAdmin (and of course, ignore any errors saying that those columns already exist.

- Jake
 
Can you add a feature for a pre-purchase callback? So let's say I want to buy the product "Custom User Title", it calls a custom function I could define to check if that user has over 1,000 posts or something, or maybe is also a user in a separate database. If it turns false, they are unable to purchase the product.

We can probably do something like this for you in the next version :)
 
Most likely not a conflict, in library/Audentio/Credit/Shop/Listener/Install/100301.php comment out/delete the following lines:

Code:
        "ALTER TABLE `adcredit_shop_product` ADD `max_active_purchases` INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER `purchases`;",
        "ALTER TABLE `adcredit_shop_product` ADD `quantity` INT(11) NOT NULL DEFAULT '-1' AFTER `max_active_purchases`;",
        "ALTER TABLE `adcredit_shop_product` ADD `giftable` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `active`;",
        "ALTER TABLE `adcredit_shop_category` ADD `active` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1' ;",
        "ALTER TABLE `adcredit_shop_product` ADD `display_on_postbit` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `active`;",
        "ALTER TABLE `adcredit_shop_product` ADD `display_on_profile_view` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `display_on_postbit`;",
        "ALTER TABLE `adcredit_shop_product` ADD `display_on_profile_inventory` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `display_on_postbit`;",
        "ALTER TABLE `xf_user` ADD `adcredit_shop_postbit_icons` BLOB NOT NULL ;",
        "ALTER TABLE `xf_user` ADD `adcredit_shop_profile_icons` BLOB NOT NULL ;",

then run the update XML and run those queries manually via phpMyAdmin (and of course, ignore any errors saying that those columns already exist.

- Jake

Okay, done. Just the one duplicate error. Now this when buying a product,

Code:
Mysqli prepare error: Unknown column 'product.display_on_profile_inventory' in 'field list'
Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
Zend_Db_Adapter_Abstract->query() in XenForo/Model.php at line 219
XenForo_Model->fetchAllKeyed() in Audentio/Credit/Shop/Model/ProductPurchase.php at line 43
Audentio_Credit_Shop_Model_ProductPurchase->getActiveProductPurchasesForUser() in Audentio/Credit/Shop/Model/ProductPurchase.php at line 160
Audentio_Credit_Shop_Model_ProductPurchase->rebuildUserIconCache() in Audentio/Credit/Shop/ControllerPublic/Product.php at line 119
Audentio_Credit_Shop_ControllerPublic_Product->actionBuy() in XenForo/FrontController.php at line 347
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /var/www/vhosts/wweforums.net/httpdocs/index.php at line 13
 
Still getting these too,

Code:
Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Unknown column 'product.display_on_profile_inventory' in 'field list' - library/Zend/Db/Statement/Mysqli.php:77
Generated By: Unknown Account, A moment ago

Code:
#0 /var/www/vhosts/wweforums.net/httpdocs/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('\n\t\t\tSELECT purc...')
#1 /var/www/vhosts/wweforums.net/httpdocs/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '\n\t\t\tSELECT purc...')
#2 /var/www/vhosts/wweforums.net/httpdocs/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('\n\t\t\tSELECT purc...')
#3 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model.php(219): Zend_Db_Adapter_Abstract->query('\n\t\t\tSELECT purc...', Array, 2)
#4 /var/www/vhosts/wweforums.net/httpdocs/library/Audentio/Credit/Shop/Model/ProductPurchase.php(56): XenForo_Model->fetchAllKeyed('\n\t\t\tSELECT purc...', 'purchase_id', Array)
#5 /var/www/vhosts/wweforums.net/httpdocs/library/Audentio/Credit/Shop/CronEntry/ExpireProduct.php(12): Audentio_Credit_Shop_Model_ProductPurchase->getExpiredPurchases(Array)
#6 [internal function]: Audentio_Credit_Shop_CronEntry_ExpireProduct::run(Array)
#7 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/Cron.php(357): call_user_func(Array, Array)
#8 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Deferred/Cron.php(24): XenForo_Model_Cron->runEntry(Array)
#9 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/Deferred.php(294): XenForo_Deferred_Cron->execute(Array, Array, 7.9999980926514, '')
#10 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/Deferred.php(428): XenForo_Model_Deferred->runDeferred(Array, 7.9999980926514, '', false)
#11 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/Deferred.php(373): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#12 /var/www/vhosts/wweforums.net/httpdocs/deferred.php(23): XenForo_Model_Deferred->run(false)
#13 {main}

slightly different stack trace to above.
 
Could you submit a ticket at Audentio.com with admin details, and possibly ftp/db access? I'm unable to replicate it. And the error suggests that that field doesn't exist, but adding it didn't work for you which is odd
 
Can you add a feature for a pre-purchase callback? So let's say I want to buy the product "Custom User Title", it calls a custom function I could define to check if that user has over 1,000 posts or something, or maybe is also a user in a separate database. If it turns false, they are unable to purchase the product.

I was just about to do this when I realized this has always been an option

Code:
Audentio_Credit_Shop_ProductType_Abstract::preBuy($product)
;)
 
How do i pass this? Cant upgrade :(

Server Error
Mysqli statement execute error : Duplicate column name 'active'

  1. Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
  2. Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
  3. Zend_Db_Adapter_Abstract->query() in Audentio/Credit/Shop/Listener/Install/1000032.php at line 14
  4. Audentio_Credit_Shop_Listener_Install_1000032::run() in Audentio/Credit/Shop/Listener/Install.php at line 28
  5. Audentio_Credit_Shop_Listener_Install::run()
  6. call_user_func() in XenForo/Model/AddOn.php at line 215
  7. XenForo_Model_AddOn->installAddOnXml() in XenForo/Model/AddOn.php at line 169
  8. XenForo_Model_AddOn->installAddOnXmlFromFile() in XenForo/ControllerAdmin/AddOn.php at line 187
  9. XenForo_ControllerAdmin_AddOn->actionInstall() in XenForo/FrontController.php at line 347
  10. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  11. XenForo_FrontController->run() in /sites/xxxxxx.xx/admin/admin.php at line 13
 
Top Bottom