Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Super Download Store for Version 2.3.x


Guest

Recommended Posts

**********

Problem after install. Admin breaks when selecting "Products Attributes".

 

Error:

Parse error: syntax error, unexpected '<' in /home/....../admin/products_attributes.php on line 854

 

That line is: </table>

 

It is right after the added code:

 

//<!--// BOF Super Download Store v2.3.x mod -->

<?php

if ( DOWNLOADS_CONTROLLER_FILEGROUP_STATUS == 'Yes' ) {

?>

<tr class="<?php echo (!($rows % 2)? 'attributes-even' : 'attributes-odd');?>">

<td class="smallText"></td>

<td class="smallText"><?php echo TABLE_TEXT_FILEGROUP; ?></td>

<td class="smallText"> <select name="filegroup_id">

<?php

$file_groups_query = tep_db_query("select * from " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD_GROUPS . " where language_id = '" . $languages_id . "' order by download_group_id");

while ($file_groups = tep_db_fetch_array($file_groups_query)) {

if ($file_groups['download_group_id'] == $products_attributes_filegroup_id) {

echo "\n" . '<option name="' . TEXT_OPTION_FILEGROUP . '" value="' . $file_groups['download_group_id'] . '" SELECTED>' . $file_groups['download_group_name'] . '</option>';

} else {

echo "\n" . '<option name="' . TEXT_OPTION_FILEGROUP . '" value="' . $file_groups['download_group_id'] . '">' . $file_groups['download_group_name'] . '</option>';

}

}

?>

</select> </td>

</tr>

<?php

}

// EOF Super Download Store v2.3.x mod

 

</table>

</td>

<td> </td>

</tr>

<?php

}

?>

 

**************************************

 

This was a clean install on new store.

 

Your help is greatly appreciated.

 

** My appologies if this is not the correct thread. I'm confused as to why there seems to be only one thread for this entire module. This makes for very difficult reading.

Link to comment
Share on other sites

You made an error editing the code:

 

</table>

</td>

<td> </td>

</tr>

<?php

}

?>

 

The HTML code cannot be in the PHP tags

 

 

Check your code edits again

 

 

 

Chris

 

ps. This is the support thread for v2.3.1, there is a different support thread for v2.2

Link to comment
Share on other sites

Alright, I am trying to upgrade my store to the Super Download Store but when I try to run the downloads_controller_english.sql, I get this error:

 

Error

 

SQL query:

#NEW FIELDS FOR DOWNLOADS CONTROLLER

INSERT INTO `configuration` ( `configuration_id` , `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` )

VALUES (

'', 'Downloads Controller Update Status Value', 'DOWNLOADS_ORDERS_STATUS_UPDATED_VALUE', '12', 'What orders_status resets the Download days and Max Downloads - Default is 12', '13', '90', '2003-02-18 13:22:32', '', NULL , NULL

);

 

 

MySQL said: b_help.png

#1062 - Duplicate entry '0' for key 'PRIMARY'

 

Can someone explain what I am doing wrong?

Link to comment
Share on other sites

@@Theodore Story

 

Is there a way to still get the new fields into the configuration table without having to run the sql query and have the contribution still work?

 

No, the SQL statement has to be run successfully in order for the contribution to work.

 

 

 

Chris

Link to comment
Share on other sites

@@DunWeb

 

I just ran the downloads_controller_english.sql file. After looking through the configuration table, it has made the very first statement

 

INSERT INTO `configuration` ( `configuration_id` , `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` ) VALUES ('', 'Downloads Controller Update Status Value', 'DOWNLOADS_ORDERS_STATUS_UPDATED_VALUE', '12', 'What orders_status resets the Download days and Max Downloads - Default is 12', '13', '90', '2003-02-18 13:22:32', '', NULL , NULL);

 

configuration_id = 0

 

The problem is when the sql statement:

 

INSERT INTO `configuration` ( `configuration_id` , `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` ) VALUES ('', 'Downloads Controller Download on hold message', 'DOWNLOADS_CONTROLLER_ON_HOLD_MSG', '<BR><font color="FF0000">NOTE: Downloads are not available until payment has been confirmed</font>', 'Downloads Controller Download on hold message', '13', '91', NOW(), NOW(), NULL , NULL);

 

It also tries to make the configuration_id = 0.

 

How do I solve this? And an FYI, it will try to do the same thing on the final statement.

Link to comment
Share on other sites

@@Theodore Story

 

The configuration ID is an AUTO INCREMENT field. The SQL statement only sets the configuration value, configuration group id and the sort order. Your SQL database sets the configuration ID and should choose the next available number.

 

 

 

Chris

Link to comment
Share on other sites

  • 4 weeks later...

I love the Super Download Store contribution. It seems to handle all my files fine, there's only one problem. When a PayPal payment goes through, it still says status pending instead of automatically allowing the download of a product. Suggestions given to others with a similar issue has led me to change the Downloads Controller Update Status Value and the Downloads Controller Order Status Value (whatever they are) both to 12 with no effect. I also have PayPal set to go to the checkout_success.php page. I'm getting the idea that there is some setting somewhere that's not quite right, but I don't know what it is. Please help.

Link to comment
Share on other sites

@@MichelleDW,

 

Check your settings to ensure you have the download status set to 11 or above. You may want to use phpmyadmin to verify the database table is set up correctly with download status above 11.

 

Also, your return URL should be to checkout_process.php NOT checkout_success.php

 

 

 

Chris

Edited by DunWeb
Link to comment
Share on other sites

@@MichelleDW, Check your settings to ensure you have the download status set to 11 or above. You may want to use phpmyadmin to verify the database table is set up correctly with download status above 11. Also, your return URL should be to checkout_process.php NOT checkout_success.php Chris

 

In the configuration table it says

Downloads Controller Update Status Value DOWNLOADS_ORDERS_STATUS_UPDATED_VALUE

12

 

and

Downloads Controller Order Status Value DOWNLOADS_CONTROLLER_ORDERS_STATUS 12

 

I misremembered and PayPal is set to go to checkout_process.php.

Link to comment
Share on other sites

  • 1 month later...

I have just read through the whole thread... I am at a loss. I installed, corrected parse errors, etc, etc. I haven't yet figured out how to get rid of the 2 links per product (side by side). I don't understand why only my group downloads have a download button.

AND, everything seems to be going much, much slower than before with the add-on--I'm still trying to figure out if it's the addon or the fact that the new product is huge.

But everything else, I'm not sure it is working quite right.

 

I may have fixed some of the issues with not having the product available right away...

 

Long day. Does anyone know if the other super downloads works better?

Sorry, Chris. I really like your contribs, but this one defeated me.

Link to comment
Share on other sites

@@vmjarala

 

The other Super Download contribution is for v2.2, this one is for v2.3. I also read this whole thread and didn't find any other cases of a duplicate download link, in fact I use this contribution on my template sales site with no issues. It must be something unique to your code.

 

 

 

Chris

Link to comment
Share on other sites

  • 1 month later...

I'm using osCommerce 2.3.1 with the Super Download Store 2.3.x (R1) addon intalled. I'm using PayPal Payments Advanced to process the credit card transactions...which is basically the PayPal Payflow payments module.

 

I think I have everything setup properly, but apparently I'm missing something since I don't get a download link after the credit card payment is processed. After the credit card is processed, I am returned to the Order Confirmation page where there is a "Thank you for your payment" statement, along with a "Reference Number" and the total amount paid.

 

I have PayPal setup with a return URL of checkout_process.php...the return URL text is "Download"...URL method is set to "Post". When I am returned to the Order Confirmation page after the credit card transaction, there is link labled "Download" that is placed just after the total amount paid. When I click on ths link I get the following error:

____________________________________

Error 404--Not Found

 

From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:

 

10.4.5 404 Not Found

 

The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.

If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.

_____________________________________

 

There was no pub folder within the catalog folder so I added it and copied the htaccess file from the download folder to the newly created pub folder...not sure if this has anything to do with my problem.

 

I have actually copied and pasted the .zip file names to the Product Attributes file name box, along with the .zip extension...so the filename reads -- samplereport.zip

 

I have the PayPal module Set Order Status to "Delivered"

 

My Configuration --> Download values are set as:

True

False

7

1

12

<BR><font color="FF0000">NOTE: Downloads are not available until payment has been confirmed</font>

10

No

 

I uploaded these files as described in the Super Download Store instructions:

  • catalog/checkout_process.php
  • catalog/download.php
  • catalog/includes/modules/downloads.php
  • catalog/admin/orders.php
  • catalog/admin/products_attributes.php

I added the following appropriate definitions as described in the Super DOwnload Store instructions:

  • catalog/includes/database_tables.php
  • catalog/admin/includes/configure.php
  • catalog/admin/includes/database_tables.php
  • catalog/admin/includes/languages/english/products_attributes.php

I ran all three sql scripts by using phpMyAdmin as described in the Super DOwnload Store instructions.

 

I ran catalog/admin/filegroup_db_setup.php as described in the Super DOwnload Store instructions.

 

 

I have been working on this for days, and now I need help.

Link to comment
Share on other sites

@@fdegree

 

Ensure your order status is 11 or above to enable the downloads.

 

If the order is not showing in the admin/orders.php then you have an issue with the configure.php paths or the PayPal module.

 

 

 

Chris

Link to comment
Share on other sites

In Configuration --> Download I have made a few changes...Download by redirect to True...Downloads Controller Update Status Value to 13...Downloads Controller Order Status Value to 12 (I also tried 11 for this setting)

 

The PayPal Payflow module Set Order Status is "Download Now Available"

 

I have the PayPal return URL as www.domain.com/catalog/checkout_process.php (I aslo tried just using checkout_process.php)

 

I still do not see the checkout_process page after the payment is made.

 

I know the checkout_process page is being built, and the download button and link to the download file is working fine because after I make the payment, and get directed to the Order Confirmation page, I then open another browser window and paste www.domain.com/catalog/checkout_process.php in the address bar...this takes me to the checkout_process page with all of the proper informaiton shown...clicking on the download button will result in the download of the file. Also, doing this results in the order showing up in Admin --> Customers --> Orders...if I don't do this the order doesn't show. I get this, until the checkout_process page is viewed, osCommerce doesn't see the order as being completed.

 

The problem is, after the payment is made, I'm not getting redirected to the checkout_process page and I don't know why.

 

If the issue is with the configure.php paths or the PayPal module, can you give me an idea as to what I should be looking for?

I went back to the configure.php file and confirmed the following line is added at the bottom, just before the ?>

define('DIR_FS_CATALOG_DOWNLOAD', DIR_FS_CATALOG . 'download/');

I also confirmed the permission was 444 or lower...it was actually set to 440

 

 

Thanks for your help, Chris!

Edited by fdegree
Link to comment
Share on other sites

OK, I'm making progress. The problem was the settings I had for the return URL in PayPal. I now have that resolved.

 

Now the problem is - I am redirected to the Catalog Login Page instead of the checkout_process page, even though the return URL in PayPal is:

https://shared ssl server.com/domain/catalog/checkout_process.php

I have tried setting the PayPal Return URL Method to "Link" and also to "Post" but I get the same result.

 

Any suggestions?

Edited by fdegree
Link to comment
Share on other sites

  • 2 weeks later...

Hi all,

After a lot of help from this thread I've managed to install and get this to work more or less. First of all: Thank you for a nice contribution and thread! :thumbsup:

 

Although in order to get the download link to appear automatically after paypal payment I have to set the Downloads Controller Order Status Value to 2. If I set it to 10 or above it doesn't work - is this a problem and if so what can I do about it? (Also, is the Downloads Controller Update Status Value important? I have set this to 15)

 

I would really appreciate if someone could explain what Downloads Controller Order Status Value is and what the number stands for.

 

 

Also from paypal I have auto return to checkout_process. However, in the settings in Oscommerce admin area should I have any specific setting for paypal on:

 

Set Preparing Order Status (currently I have "Download Now Available") and Set PayPal Acknowledged Order Status: (currently I have "Processing".

 

Are these related to the Download Controller Update Status Value and the functionality of this contribution?

 

 

Sorry for all the questions, although they have in one way or another been asked in the thread without any satisfying answer.

 

Please help - any help is of course much appreciated.

 

(PS It might be good to know that I have got this to work with Free Product Checkout for files that I want to be free (w00t) )

 

Kind regards.

Link to comment
Share on other sites

Oscar

 

Set Preparing Order Status (currently I have "Download Now Available") and Set PayPal Acknowledged Order Status: (currently I have "Processing".

 

This looks wrong and i think it should be the other way around. My store sells downloads and i have it this way and it works fine.

 

Set Preparing Order Status ( "Processing") and Set PayPal Acknowledged Order Status: ( "Download Now Available")

 

Then in your admin area localisation order status make sure you have pending not to allow downloads and download available to allow downloads.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

OK, I'm making progress. The problem was the settings I had for the return URL in PayPal. I now have that resolved.

 

Now the problem is - I am redirected to the Catalog Login Page instead of the checkout_process page, even though the return URL in PayPal is:

https://shared ssl server.com/domain/catalog/checkout_process.php

I have tried setting the PayPal Return URL Method to "Link" and also to "Post" but I get the same result.

 

Any suggestions?

 

Your return url should be to www.yourstore.com/checkout_process.php

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...