Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: File downloads not matching correctly to product  (Read 6733 times)

Offline papafrankc

  • Newbie
  • *
  • Posts: 29
  • Karma: +3/-0
    • View Profile
File downloads not matching correctly to product
« on: June 24, 2018, 07:01:37 PM »
Here's my problem:  I have some scrollsaw patterns on my site that I give away at no charge.

I create a new product: Price=$0, Track stock=NO, Requires shipping=OFF, Free Shipping=ON
I add a Downloadable PDF FILE under the Files tab.

Now I repeat this procedure for 13-15 products.  However when I try to download them, some are mixed up.  E.G. Product A should have file A.  But sometimes it will have file B or C or...  Some products work OK and some don't.

I originally set these up in Dec 2017 and they have been working OK for about 5 months.  I did not made any changes to my system or files during this time.

To try to fix it I did the following:
I went to my CPANEL and did a REPAIR DATABASE thinking it might be a data/index problem.  No Help.
I was on ver 1.2.10 so I upgraded to 1.2.11 then to 1.2.12.  No help.
I tried to fix the products that were pointing to a wrong file.  The fix looked good but the problem would show up on a different product.

I then removed all 13 products, then started to add them back one-by-one.  After 6 products I went back & checked the first few I had added.  Some of them now point to a download file that belongs to another product.

I can go into a Product and correct the file, then sometimes another product will be pointing to the wrong download file.

At this point I'm pretty much stuck.  Any thoughts will be appreciated.

Thanks
Frank

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5774
  • Karma: +274/-2
    • View Profile
Re: File downloads not matching correctly to product
« Reply #1 on: June 25, 2018, 01:19:24 AM »
When you add file to a product do you use Global downloads or add new every time?

Offline papafrankc

  • Newbie
  • *
  • Posts: 29
  • Karma: +3/-0
    • View Profile
Re: File downloads not matching correctly to product
« Reply #2 on: June 25, 2018, 01:33:09 AM »
I'm not sure what Global downloads is?  I believe I add new every time.  I click on the Files tab, then I use the PLUS sign to start putting in the file download info.  When I re-did my 13 products I didn't have any files loaded, so I loaded them from my PC, one for each product.

Comment: I did this same procedure 5 months ago and everything went OK.  I had a fair amount of folks who downloaded my patterns.  It was just this week that one of my customers pointed out that she was getting the wrong files.  So I'm curious as to what might have changed?

Thanks
Frank

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2046
  • Karma: +318/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: File downloads not matching correctly to product
« Reply #3 on: June 25, 2018, 03:36:40 AM »
hi.
Please open phpMyAdmin and check database tables "products_to_dowloads" and "dowloads".
Needs to be sure that assignment is correct.
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline eCommerce Core

  • Administrator
  • Hero Member
  • *****
  • Posts: 1602
  • Karma: +93/-1
    • View Profile
Re: File downloads not matching correctly to product
« Reply #4 on: June 25, 2018, 07:11:57 AM »
Did you do any database o code modifications?
Can you PM access to your admin? I will check to see.
“If you’re in the luckiest one per cent of humanity, you owe it to the rest of humanity to think about the other 99 per cent.”
― Warren Buffett

Offline papafrankc

  • Newbie
  • *
  • Posts: 29
  • Karma: +3/-0
    • View Profile
Re: File downloads not matching correctly to product
« Reply #5 on: June 25, 2018, 11:53:16 AM »
Thank you both for your replies.

check database tables "products_to_dowloads" and "dowloads"
In the "Products to Download" table there are 2 entries:

Prod_ID    Download_ID
190              32
196              32

These are 2 different products that appear to point to the same download file.  When I inputted the first product it was OK.  However it looks like when I inputted the second product, it changed which file the first product is pointing to.

The "Downloads" file has only 5 entries and they all have unique ID numbers.

Did you do any database o code modifications?  I'm not sure what this is and I haven't done any modifications that I know of.

Can you PM access to your admin? I will check to see.  I'm not sure what PM access is?

When I first found this problem I thought it might be a database indexing problem.  But I wasn't sure where to go from there.  Checking these tables it looks like I might be correct?  Any thoughts on what I should do next?

Thanks, Frank

Offline papafrankc

  • Newbie
  • *
  • Posts: 29
  • Karma: +3/-0
    • View Profile
Re: File downloads not matching correctly to product
« Reply #6 on: June 25, 2018, 09:01:26 PM »
Update:

I've made some progress.  Here's what I did:

I TRUNCATED the downloads file and the product_to_downloads file
So I basically started over from scratch.

I then added my 15 products and their corresponding download files - one at a time.

Note: by trial and error I learned that adding products using the CLONE option seemed to be what was messing me up when I was trying to add new products with their download files.

When I was using the product CLONE option and I was deleting the download file, I found that it was deleting the download file from my system.

Also when using the CLONE option, if I tried to modify/update the download file, I discovered that it was overwriting the original download file that I was CLONING from

So the only procedure that did work for me was to add a New Product and download file from scratch and not to use the CLONE option.

Note: I'm glad that this procedure does seem to work for me however it doesn't explain why the products and download files got scrambled in the first place?  I had not touched those products in the last 5 months.

Thanks for everyone's help.
Frank

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5774
  • Karma: +274/-2
    • View Profile
Re: File downloads not matching correctly to product
« Reply #7 on: June 26, 2018, 01:16:40 AM »
Hello.
When you clone it attach same file to several products. It does not create new files

Offline papafrankc

  • Newbie
  • *
  • Posts: 29
  • Karma: +3/-0
    • View Profile
Re: File downloads not matching correctly to product
« Reply #8 on: June 26, 2018, 02:24:16 AM »
I was just using the clone option because the products are so similar.  It saved me some data entry time.  However I need to have a unique download file to go with each separate product.  It appears that I can't or shouldn't use the clone option. And that's OK now that I understand how it works.

Thanks
Frank

Offline papafrankc

  • Newbie
  • *
  • Posts: 29
  • Karma: +3/-0
    • View Profile
Re: File downloads not matching correctly to product
« Reply #9 on: June 26, 2018, 12:38:03 PM »
I was just wondering - When you create a new product using the clone option, shouldn't you be able to go into FILES and edit/change the FILE being used by the product?

Since I'm able to edit all other parts of the order it would seem logical to me that I should be able to edit the FILE being used by the product.

But as I mentioned in my earlier posts,  by editing the download file it messes up the download from the previous product.

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5774
  • Karma: +274/-2
    • View Profile
Re: File downloads not matching correctly to product
« Reply #10 on: June 27, 2018, 01:04:35 AM »
Hi.
Clone product link all resources like images or files. For the images you can see "linked to" in Resource Library we will improve same for files soon https://github.com/abantecart/abantecart-src/issues/1135

For the order you can add more download files and click "push old orders" https://abantecart.atlassian.net/wiki/spaces/AD/pages/10944669/Order+Files+Downloads

 

Powered by SMFPacks Social Login Mod