Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Download redirect or auto email with dl link not happening


Guest

Recommended Posts

Posted

I looked and I do have the .htaccess from my server as suggested from another topic...however, I guess I jsut do not understand. The whole download digital products thing is NOT working for me. Layman's terms, please. I am not a seasoned programmer and am educating myself as I go. So far, Ive done okay but this digital product download stuff is making me go gray headed.

 

Do I take the .htaccess file and copy it into the downloads folder where my downloadable product is if it is not in there already?

 

Also, how do I get the redirect for each product to work? After purchasing the product, it just sits there at paypal...if they click to go back to my site, it just goes back to the shopping cart and sits there. There is a confirmation email sent of the purchase, but NO download link included in the email or a popup for them to download. I have gone and looked at the files containing the payment/purchase success .. blah, blah...and I saw towards the bottom that after the purchase where success is confirmed, the dl links should be there! What gives?

 

If I put the product's URL on the product page, they can go directly there and dl without paying, (actually, my permissions have been reset, so no one has permissions but me) however, how do I get it to work?

 

Any help out there for me?

 

Thanks guys, I appreciate ya.

 

Michelle

Posted

You cannot use downloads with the standard Pay Pal module, it is very easily abused. You have to use the osCommerce Pay Pal IPN module, and install the Downloads Controller add-on (which is not an easy install).

 

You also have configuration problem if people coming back from Pay Pal are ending up in the shopping basket.

 

Vger

Posted
You cannot use downloads with the standard Pay Pal module, it is very easily abused. You have to use the osCommerce Pay Pal IPN module, and install the Downloads Controller add-on (which is not an easy install).

 

You also have configuration problem if people coming back from Pay Pal are ending up in the shopping basket.

 

Vger

 

Vger,

 

Does this still apply to the latest release of OSC? It appears to have the IPN module built in. How is it abused? I seem to have it working fine but without stock subtraction as I mentioned in a previous post.

 

Any furthere insight into this would be helpful

Posted

Doing even more research after I posted this, I found an old tip from someone and it was working pretty good...got the dl link to the products to finally show up after payment (not only right there where their confirmation of the purchase is, but also they can dl later in MY ACCOUNT, if you have given them more than one chance to dl) , customer is redirected back fine, however, when I click on the dl link, I am getting a syntax error. Im am almost positive that I have a stupid space or apostrophe where I shouldnt. Sometimes its hard to tell if there is a space or not when you print these things off to have right in front of you when you're messing with the codes.

 

The post also listed code addition/change to keep ppl from being able to abuse the downloaded products.

 

Here is the c/p post from cyber2000 (rj):

 

Ok guys,

 

whilst looking on here for help in other areas, i still see that some are having problems in being able to get the downloads to work. Soo herre is the info for you thanks to my research on here and those that posted them in the first place:

 

Have you downloads activated??

 

If not you have to do this via the admin panel. In the 'Configuration' panel click 'Download'. Once you have that done click 'Enable download' and set it to 'true'.

 

You then have associate the sownloadable file to the product so you have to go into the 'Catalog' menu and click the 'Product Attributes' link. When you get to this page you will see three options 'Product Options', 'Option Values' and 'Products Attributes'. In the 'Product Options' menu enter a new option name called 'Download'. Once you have that entered go over to the 'Option Values' and enter in 'Yes' for the 'Download' option. Once you have all that done now you can go to the 'Product Attributes' panel and select your pruduct. Set the 'Option Value' for 'Download' and set the 'Option Value' to 'Yes'. Directly below the 'Option Name' there is a text window called 'Filename:'. Here you have to enter the name of the file thats associated with your product. Then just enter the expiry times etc and bobs your uncle.

 

Of course all this is useless if you do not have your product uploaded to the correct directory. The default directory is called 'download' but since you are selling a digital product I would reccommend that you change the name of the folder as this is the first place any hacker would look to get your stuff for free. If you do decide to change the name of the folder you will also have to change the name in 'includes/configure.php' to reflect the changes you made to the download folder.

 

no once you have done this the downloads will automatically be available upon a credit card payment. So, test cards will still allow them to steal the download for free. To ensure that the customer can only download once you have physically been paid add the foolowing code:

 

If you have the default osc catalog\download.php file try changing first sql query to this:

CODE

 

// Check that order_id, customer_id and filename match

$downloads_query = tep_db_query("select date_format(o.date_purchased, '%Y-%m-%d') as date_purchased_day, opd.download_maxdays, opd.download_count, opd.download_maxdays, opd.orders_products_filename from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " opd where o.customers_id = '" . $customer_id . "' and o.orders_id = '" . (int)$HTTP_GET_VARS['order'] . "' and o.order_status = '3' and o.orders_id = op.orders_id and op.orders_products_id = opd.orders_products_id and opd.orders_products_download_id = '" . (int)$HTTP_GET_VARS['id'] . "' and opd.orders_products_filename != ''");

 

 

This code should only allow the d/l if the order is set to delivered. so in admin control panel, if you click on the customer orders and then set the order from pending to delivered, the customer ONLY then will be allowed to click the link and download their order.

 

This STOPS ALL customer from sttealing your downloads by using the test credit card number (which I wont display even you know it as it is not fair).

 

Hope you get it and it works as I am using it and it works great.

 

 

Thanks

 

 

RJ

 

 

 

In doing these steps, I have made GREAT progress, however, the error is still hanging me up. Question: in between the periods and apostrophes and quotes, should there be spaces? Also, as you see at the end of the changed code, there is a semicolon. Should that be there? Is that causing the problem? Should the remaining original code AFTER this stay?

 

Here is mine:

// Check that order_id, customer_id and filename match

$downloads_query = tep_db_query("select date_format(o.date_purchased, '%Y-%m-%d') as date_purchased_day, opd.download_maxdays, opd.download_count, opd.download_maxdays, opd.orders_products_filename from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " opd where o.customers_id = '" . $customer_id . "' and o.orders_id = '". (int)$HTTP_GET_VARS['order'] . '" and o.order_status = '3' and o.orders_id = op.orders_id and op.orders_products_id = opd.orders_products_id and opd.orders_products_download_id = '". (int)$HTTP_GET_VARS['id']. '" and opd.orders_products_filename ! = ''"; " . TABLE_ORDERS_STATUS . " os where o.customers_id = '" . $customer_id . "' and o.orders_id = '" . (int)$HTTP_GET_VARS['order'] . "' and o.orders_id = op.orders_id and op.orders_products_id = opd.orders_products_id and opd.orders_products_download_id = '" . (int)$HTTP_GET_VARS['id'] . "' and opd.orders_products_filename != ''"); and o.orders_status = os.orders_status_id and os.downloads_flag = '1' and os.language_id = '" . (int)$languages_id . "'");

if (!tep_db_num_rows($downloads_query)) die;

$downloads = tep_db_fetch_array($downloads_query);

 

Should the latter part remain? Have I flubbed up with a space or something?

 

YOU GUYS ARE GREAT AND I APPRECIATE ANY HELP YOU CAN GIVE!

 

Michelle

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...