News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Getting an error with downloads for sale plugin

Started by Melch777, March 02, 2016, 13:21:21 PM

Previous topic - Next topic

Melch777

I am using Joomla 3.0.4 and Virtuemart 3.0.8 and am using "Downloads for Sale" plug-in which worked great on my other site until my hosting provider changed something to their servers?. I did a fresh install, reinstalled this plug-in, the custom field for it setup, yet when I go to save the custom field for it I get this message:

Notice

alterTable CHANGE jal3_virtuemart_product_custom_plg_downloads_for_sale.virtuemart_customfield_id : ALTER TABLE `jal3_virtuemart_product_custom_plg_downloads_for_sale` CHANGE COLUMN `virtuemart_customfield_id` `virtuemart_customfield_id` INT(11) UNSIGNED NOT NULL DEFAULT 0 AFTER `id`

alterTable CHANGE jal3_virtuemart_product_custom_plg_downloads_for_sale.virtuemart_order_item_id : ALTER TABLE `jal3_virtuemart_product_custom_plg_downloads_for_sale` CHANGE COLUMN `virtuemart_order_item_id` `virtuemart_order_item_id` INT(11) UNSIGNED NULL DEFAULT 0 AFTER `virtuemart_customfield_id`

alterTable CHANGE jal3_virtuemart_product_custom_plg_downloads_for_sale.downloaded : ALTER TABLE `jal3_virtuemart_product_custom_plg_downloads_for_sale` CHANGE COLUMN `downloaded` `downloaded` INT(11) UNSIGNED NOT NULL DEFAULT 0 AFTER `virtuemart_order_item_id`


Table updated: Tablename jal3_virtuemart_product_custom_plg_downloads_for_sale dropped: 0 altered: 3 added: 0

Custom Fields successfully saved

Can anyone explain to me what this message means? Thanks

Melch777

I contacted my hosting company, which is siteground and he looked at my sql database and my permissions and said that they looked fine. Somehow the plug-in doesn't work with the hosting company. I need plug-in that will generate and send download links for mp3 files to the buyer's e@mail address. Downloads for Sale worked great, flawlessly for 1 year and then all of a sudden didn't work on my ipower account, which I cancelled and then I moved to siteground and am having the above issues from the last post with it.

the alter Table probably has something to do with a table not being altered in the db?
the change Column probably has something to do with a column not being changed in the db?

So somehow the plug-in doesn't interact probably with the hosting company

Are their any plug-ins for sending download links to a buyer in their email that are approved by Virtuemart?

GJC Web Design

what is the plugin your using? "Downloads for Sale" plug-in means nothing to me

I use the Istraxx one -- works fine for me
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Melch777

Quote from: GJC Web Design on March 04, 2016, 00:43:41 AM
what is the plugin your using? "Downloads for Sale" plug-in means nothing to me

I use the Istraxx one -- works fine for me
http://open-tools.net/virtuemart/downloads-for-sale.html

This one used to work great but I'm getting the above error message so I was looking for another one. Maybe Istraxx. Thanks

Melch777

Quote from: jenkinhill on March 04, 2016, 10:34:01 AM
http://extensions.virtuemart.net/shipments/shipment-for-virtual-products-detail

Thanks Jenkin, I was looking at that one, just wasn't sure if I was going to run into the same issues with Alter Table as with the one I'm now using.

jenkinhill

I just noticed this:  "I am using Joomla 3.0.4 and Virtuemart 3.0.8"

If so then you must seriosly think about updating for security reasons! 
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Melch777

#7
Quote from: jenkinhill on March 04, 2016, 16:19:43 PM
I just noticed this:  "I am using Joomla 3.0.4 and Virtuemart 3.0.8"

If so then you must seriosly think about updating for security reasons!

I just updated my site to 3.4.8 for joomla and 3.0.12 for Virtuemart.

When I reset the Custom Field for the "Download for Sale" plugin, my error messages get reduced but still it doesn't work

alterTable CHANGE jal3_virtuemart_product_custom_plg_downloads_for_sale.virtuemart_customfield_id

alterTable CHANGE jal3_virtuemart_product_custom_plg_downloads_for_sale.virtuemart_order_item_id

alterTable CHANGE jal3_virtuemart_product_custom_plg_downloads_for_sale.downloaded


reinhold

Dear Melch,
The alterTable notices are no error messages. Whenever you change/save a custom field definition, VirtueMart will try to make sure the database has the correct structure and will ALWAYS run the update SQL for all custom fields that use a database table (like our downloads for sale plugin), even if the database structure has not changed and has the correct form. The messages you see simply tell you the steps that VM makes when checking the database structure.
I looked into it a while ago, but could not find a way around it. These messages are simply progress messages about the database update (but since the database structure is already correct, nothing is actually changed), it is just annoying debug output in VM3, but not any indication of an error, to the contrary it is the usual behaviour. It just seems that none of your other custom field plugins use their own database table, so you haven't encountered this issue with other custom fields.

Now, to your real problem: You say that whenever you make an order, the custom field that you added to the product (and selected a proper file to download) is not displayed in the order confirmation or on the product page. What exactly are the settings of the custom field definition and of the custom field instance that you added to the product?

In particular, which order statuses have you selected as making the download available? And have you configured the custom field to be shown (either compact or long display) on the product page and/or the invoice/order confirmation mail?

You can check the invoice manually by clicking on the invoice symbol in the order list in the Joomla/VM backend. Of course, the link will only be displayed if the order has a status that allows download.

Alternatively, if you like, I can also directly look at your installation (if you feel comfortable giving temporary access to a stranger).

Best regards,
Reinhold

reinhold

Dear Melch,
I have now done some more digging and figured out a way to prevent those alterTable messages in VirtueMart: It turns out that VM compares SQL columnt definitions verbatim with a SQL string it constructs itself. If those two don't coincide, it tries to alter the database. Now, the issue was that VM constructed the SQL as
int(11) UNSIGNED NOT NULL DEFAULT '0'
while our plugin used a (perfectly valid) column definition of
int(11) UNSIGNED NOT NULL DEFAULT 0
Since they differed in the quotes around the zero, VM wrongly assumed the column has changed and tried to alter the database over and over again... I have now released a version 1.8.2, which brings the SQL column definitions in line with the ones expected by VM. If you upgrade the plugin to version 1.8.2 at least those warnings should be gone.

However, these warnings should not have influenced the plugin's functionality at all, so the real issue of your problems lies elsewhere...

Best regards,
Reinhold

Melch777

Quote from: reinhold on March 06, 2016, 19:07:46 PM
Dear Melch,
I have now done some more digging and figured out a way to prevent those alterTable messages in VirtueMart: It turns out that VM compares SQL columnt definitions verbatim with a SQL string it constructs itself. If those two don't coincide, it tries to alter the database. Now, the issue was that VM constructed the SQL as
int(11) UNSIGNED NOT NULL DEFAULT '0'
while our plugin used a (perfectly valid) column definition of
int(11) UNSIGNED NOT NULL DEFAULT 0
Since they differed in the quotes around the zero, VM wrongly assumed the column has changed and tried to alter the database over and over again... I have now released a version 1.8.2, which brings the SQL column definitions in line with the ones expected by VM. If you upgrade the plugin to version 1.8.2 at least those warnings should be gone.

However, these warnings should not have influenced the plugin's functionality at all, so the real issue of your problems lies elsewhere...

Best regards,
Reinhold

Thanks Reinhold, I couldn't get the plug-in to set up download links or generate invoices/emails.