Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Super Download Store


AlexStudio

Recommended Posts

Hey Alex, Im trying to get this to work with the order editor and I know I have to change sql input but im not quite sure how to do it...

 

This is the statement that add normal downloads:

			  //check for downloads
		  $download_query = tep_db_query("select * from " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " where products_attributes_id = '" . (int)$attribute_price['products_attributes_id'] . "'");
		  if (tep_db_num_rows($download_query)) {
			  $download = tep_db_fetch_array($download_query);
			  tep_db_query("insert into " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " (orders_id, orders_products_id, orders_products_filename, download_maxdays, download_count) values ('" . $orders_id . "', '0', '" . tep_db_input((string)$download['products_attributes_filename']) . "', '" . tep_db_input((int)$download['products_attributes_maxdays']) . "', '" . tep_db_input((int)$download['products_attributes_maxcount']) . "')");
		  }

 

I can really figure out how to adapt the code for this contribution.

Link to comment
Share on other sites

- STEP 3.2 - And then add new definitions to files list below: (Do NOT overwrite your existing files with the ones came with this package!!)

 

 

catalog/includes/database_tables.php

catalog/admin/includes/configure.php

catalog/admin/includes/database_tables.php

catalog/admin/includes/languages/english/products_attributes.php

 

Where are the new definitions that must be added to those files?

Link to comment
Share on other sites

You need to break file group into files in this piece of code. You can refer to the modification in checkout_process.php.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

Where are the new definitions that must be added to those files?

in the modified_files folder of the package.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

in the modified_files folder of the package.

 

For reference purposes, the new definitions mentioned in step 3.2 "Add new definitions ..."

 

is

  define('TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD_GROUPS','products_attributes_download_groups');
 define('TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD_GROUPS_FILES','products_attributes_download_groups_files');
 define('TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD_GROUPS_TO_FILES','products_attributes_download_groups_to_files');

 

Since the super download store is the only module that I am installing in this installation of osCommerce 2.2 Milestone 2 Update 060817, would it be useful to add the modified versions of the files to the contribution package so that those installing the same milestone could simplify their install?

Link to comment
Share on other sites

I think it is easier to install it in this way for most store owners, who already have some contributions installed, and don't need to scroll all the way down in the files to see the necessary modifications.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

Ah, then, perhaps one could put the code snippet (or a link to the file) in the install.html file included with the package in step 3.2 so that the code that must be pasted is there?

 

Such a minor change would have made installing this contribution much easier for me as the install instructions were not clear on where the new definitions were.

 

  define('TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD_GROUPS','products_attributes_download_groups');
 define('TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD_GROUPS_FILES','products_attributes_download_groups_files');
 define('TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD_GROUPS_TO_FILES','products_attributes_download_groups_to_files');

Deleting or renaming /modified/catalog/database_tables.php in the contribution would also help to prevent accidentally overwriting the same file.

Link to comment
Share on other sites

I have installed this contribution and was able to set up a file download group, however, once I try to add this group to a downloadable product, I receive this error:

 

1136 - Column count doesn't match value count at row 1

 

insert into products_attributes values ('', '266', '8', '10', '', '+')

 

[TEP STOP]

 

 

Any ideas on how to solve this? Should I be looking in my database or in the php?

Link to comment
Share on other sites

There is something wrong in your catalog/admin/products_attributes.php. Please compare your file with the SDS v1.1 file carefully.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

There is something wrong in your catalog/admin/products_attributes.php. Please compare your file with the SDS v1.1 file carefully.

 

 

Thanks for the quick reply!

 

I actually went ahead and tried just replacing my file with the one that was packed with SDS v1.1. I am still having a problem. I also tried replacing with my original backed up copy of products_attributes.php but get the same error. Very Curious.

Link to comment
Share on other sites

Just a question about cleanup when doing download by redirect... I didn't see any discussion about this.

(note : I did not install the contrib yet, just looking at the code)

 

Each time someone downloads a file, a symbolic link is created.

Potentially, with many many downloads, this could use disk space for nothing... why not cleaning up ?

 

... but my main question is : what if we want to prevent people from downloading the file after x days ?

Should we have to manually remove the links (else visitors could just store the link URL) ?

 

Thanks for your answers !

Link to comment
Share on other sites

Just a question about cleanup when doing download by redirect... I didn't see any discussion about this.

(note : I did not install the contrib yet, just looking at the code)

Each time someone downloads a file, a symbolic link is created.

Potentially, with many many downloads, this could use disk space for nothing... why not cleaning up ?

Symbolic links don't use disk space. They will be cleaned up every time when the download by redirect code is called.

 

... but my main question is : what if we want to prevent people from downloading the file after x days ?

Should we have to manually remove the links (else visitors could just store the link URL) ?

Thanks for your answers !

Set the Max Download Day option in download setting to x days.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

Symbolic links don't use disk space. They will be cleaned up every time when the download by redirect code is called.

Set the Max Download Day option in download setting to x days.

 

Oops, sorry, I missed that part : did not see the tep_unlink_temp_dir function ! :-"

OK, so everything is fine ! Thanks for the contrib ! :-)

Link to comment
Share on other sites

Hi I think I got this cortribution installed on my test server and woud like to go to a live server soon.

 

I have some questions:

 

1)The file groups? Do I need that also for single file downloads? I normally would creat a zipfile containing 10 - 20 files as one download.

I have about 1000 photo's that I would like to sell in portions of 10-20. and also some additional info text in the container.

having all 1000 in the download folder at a time makes it quite hard to select which will go in a package.

 

2) I also want to add dutch as language. Can I just add the dutch contribution after instaling SDS or should I have done that before?

 

3) I would like to start with a paypall contribution at first ( paypall IPN?) and add later other payment solutions. I read of some problems after installing payment modules. Is there an issue in this? Should I first install the payment contributions and after that install SDS?

 

4)Is there a list of payment modules that can handle the automatic payments for SDS?

 

Sorry just a list of (maybe silly) questions from someone just started to like OS commerce after Zencart, espescially after discovering SDS :) This would perfectly suit my needs for this type of site.

Link to comment
Share on other sites

1. Single files don't need the file group, you just assign them to attributes as the way before installing SDS.

2. If you want to add language packages after SDS installed, you need to run the filegroup_db_setup.php again to create the initial group for the new languages.

3. and 4. Regarding payment modules, please find them yourself. When testing payment modules, a clean installed osCommerce is always better than a heavily modified one.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

Hi Alex Thanks a lot.

 

Now I understand the concept of the filegroups.

Not being nativ english sometimes makes obviuos things confusing:S

 

So i will install the dutch languagepack first:)

 

This contribution of SDS really looks great!!

Really apreciate...

If I get some sales from the shop I won't forget..

Link to comment
Share on other sites

There is something wrong in your catalog/admin/products_attributes.php. Please compare your file with the SDS v1.1 file carefully.

 

 

 

Thanks for the quick reply!

 

I actually went ahead and tried just replacing my file with the one that was packed with SDS v1.1. I am still having a problem. I also tried replacing with my original backed up copy of products_attributes.php but get the same error. Very Curious.

 

 

I was just wondering if you would know why I might still be getting this error:

 

1136 - Column count doesn't match value count at row 1

 

insert into products_attributes values ('', '266', '8', '10', '', '+')

 

[TEP STOP]

 

It doesn't seem to be the catalog/admin/products_attributes.php file. As it stands now, I can't add product attributes as a single file or a group. It seems to not write some of the information to the database or something. Any insight would be greatly appreciated.

Link to comment
Share on other sites

Hi Alex,

i have subfolders in my download folder.

When i'm trying to "Add Multiple Files To Group" by clicking on the subfolder-icon then nothing happens.

What is wrong?

Please compare your catalog/admin/products_attributes.php with SDS file carefully.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

The only place related to your problem is catalog/admin/products_attributes.php

 

The problem is there before you install SDS. The error message is showing that you're trying to write 6 columns of data into a table which only has 4 or 5 columns.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

The only place related to your problem is catalog/admin/products_attributes.php

 

The problem is there before you install SDS. The error message is showing that you're trying to write 6 columns of data into a table which only has 4 or 5 columns.

 

Thanks! I did have an extra column in my database (from another contribution I think). Thanks for the help! Works great now.

Link to comment
Share on other sites

When i'm trying to "Add Multiple Files To Group" by clicking on the subfolder-icon then nothing happens.

What is wrong?

Winmerge says they are identical

What did you mean 'nothing happens'? Did you see the sub folder name next to the icon?

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

Still testing

 

I have no module installed so customers sees cash on delivery

 

Now I can go through the checkout and I see customer gets mail.

After update order status I see another mail for customer, but none of the has a link for the download:S

 

I expected that to be in the mail to the customer. How does the customer know where to download?

Link to comment
Share on other sites

I installed this module, seems very nice, but unfortunately i was thinking this would allow me to have unique downloads. Each of my customers would be purchasing a unique download package. The certificate to use the package is different on each download. So unless I have missed something, this will not help me. But it seems to be a good contribution in any case.

 

Assuming I am correct and this not now allow for 100% unique downloads (every single download being a different package, but same product), does anyone know of such a module?

 

MDP

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.
Note: Your post will require moderator approval before it will be visible.

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...