Jump to content

Free Shipping option for certain products


karibranch

Recommended Posts

Welcome karibranch! Glad to see you made it to the forums.

 

An order that has only digital items in it should not trigger shipping. Otherwise, an order with digital and tangible items will trigger shipping, with the digital item being immediately available for download upon payment.

 

So we are not sure of how your digital item is causing shipping to be needed. May we ask what version of CC5 you are running?

 

Anyway, one approach would be to assign 0 weight to the digital item. In the Shipping by Weight module, you would name First Class as "Free" and specify a weight band of 0.001:0 (I think that's how it goes). That is, if the weight of the order is 0.001 (lbs or kgs), this shipping option is available (Free). Any other product will put the weight of the order over this, and so this shipping option will disappear from the shipping choices.

Link to comment
Share on other sites

I just installed the free version of the software via GoDaddy through Cpanel so I'm assuming its the latest.  I don't see a version listed but it looks like the php file is 5.4.24.

 

As for the digital download, my file size is too big, it is a digital version of a movie, so it isn't letting me upload, at least with the free version.  I only have two products for this film website, a DVD to purchase and a digital download, so don't need a big storefront and was hoping not to have to purchase more software.  Both products have been created and each has it's own corresponding category; DVD and Digital Download.  I do have the film file in the website files and can just drop it directly into a cubecart folder and avoid the "upload", just let me know which folder will recognize it as digital file.  

 

I tried setting shipping per category, a flat rate for the DVD, and free shipping for the Digital download, but it wouldn't bring up the flat rate for the DVD if I had both in the basket and the digital download was listed first.  

 

So I just tried what you suggested by weight and with just the digital download item in the basket, I get a flat rate shipping of $4 which is the DVD shipping.  

 

Any ideas?  thanks!

Link to comment
Share on other sites

In admin, the first screen you see is the "Dashboard". A tab along the top gives Store Overview. You will see the CubeCart version here.

 

FTP your file to a folder that is a sibling of "public_html". (The name of this folder may be something similar: doc-root, webroot, wwwroot, etc.) That is, when you log in with FTP to your site, you should see a number of folders, public_ftp and public_html perhaps, among others. (The folder public_html contains the files that run your web site and CubeCart.)

 

You can choose to make a new folder in this location, or you can use public_ftp. Either will be a sibling folder to public_html.

 

So, you now have the movie file in a folder that is not within public_html. Take note of the full path (hopefully, your FTP program will show this).

 

In CubeCart admin, edit the digital version of the product. On the Digital tab, enter the full path including the name of the file in the Custom File Path field. Click Save.

 

Now that CubeCart has information that implies this product is digital, it will be treated as such. Digital items do not influence shipping in any way.

Link to comment
Share on other sites

"it is a digital version of a movie, so it isn't letting me upload, at least with the free version."

 

CubeCart Lite does not restrict the sizes of files that can be uploaded. There is a limit imposed by PHP, and a limit imposed by the web server (Apache?). This is shown on the Store Overview page.

 

CubeCart, generally, does limit the size of image files that can be uploaded - 256K(?). A change to the code is necessary to adjust this limit.

Link to comment
Share on other sites

Version 5.2.8

 

Digital download is now populating without shipping and DVD brings up flat rate! Thanks so much.   

 

(I may get back with you in the next few days, my next objective is when people buy large quanities..)

 

Since I entered the path manually, Is there a way to test the digital download path to make sure it's correct without having to purchase the download?

Link to comment
Share on other sites

"Is there a way to test the digital download path to make sure it's correct without having to purchase the download?"

 

That's an excellent question. The answer is, no, not without some manual preparation first.

 

What you can try to do in admin is:

* create a fake customer

* create a fake order for that customer

Important, and applies to CC528 as well, please read: '?do=embed' frameborder='0' data-embedContent>>

 

Or, use the existing order that you tested the shipping with, and:

 

* in admin, that order has it's status changed from Pending to Processing (meaning, you say it was paid for, even though it wasn't)

* CubeCart sends the digital download email to the customer

 

The mechanism CubeCart uses to "protect" unauthorized downloads is to "manage" the preparation of the file's download to the browser. That mechanism requires the accesskey found in the URL of the order's download link. Without an accesskey, there will be no download.

Link to comment
Share on other sites

"found that the file had to be under 'public' area of site"

 

You may have some sort of security measure installed on your server that would prevent PHP from being able to access a file outside the 'public_html' folder. That's the only explanation I can come up with.

 

Is this conclusion based on what your hosting provider said?

 

If, and this is a small if, someone were to learn of the file's name and location within the 'public' area of your site, then the file could be downloaded unauthorized.

Link to comment
Share on other sites

"then the file could be downloaded unauthorized"

 

Yes, I was slightly concerned with that, and upon subsequent tries, the download doesn't actually seem to be working after all. ( I thought it found the file but wouldn't let me download since I had not paid, but it actually can't find the file if I cut/paste the link from the download email into the browser.)  

I am using Cpanel and both the public_ftp and public_html are supposed to be accessible, hence "public", but it doesn't seem to find it no matter how I structure the path...

 

I'll have to tackle this tomorrow, need to get other edits done, let me know if you have any ideas!  Thanks!

Link to comment
Share on other sites

CubeCart will find the file, if your hosting account has permission to access the folder it is in.

 

So, I can only ask that you verify you have entered the complete and full path to the file. That path might look like:

/home/account_owner/not_public_html_folder/name_of_file.mov

Link to comment
Share on other sites

Yes it looks like that, and it may not be that it can't find it - I'm not getting a 404error.  It may be an access or file size issue, I get a "waiting for website" and then "no data received" error.

 

(I did retry directly uploading through CubeCart but after only 1% it crashes repeatedly)

Link to comment
Share on other sites

Just a thought - why not create a test digital product where size will not be an issue, so you can rule out that being your problem. From what Bsmither said it doesn't sound like the file size is part of your problem, but testing with a small download might eliminate that as a possible concern.

Link to comment
Share on other sites

As a short-term test, FTP the movie into CubeCart's /files/ sub-folder.

 

In admin, change the product's Custom File Path to:

http://www.mystore.com/subfolder/files/name_of_file.mov

That is, make this a regular, publicly-accessible link. Click Save.

 

Enter this same URL in a browser window. I have no doubt the browser will begin to download it. And if so, we can rule out limits imposed by the web server that we may not know about.

 

For the previous method, CubeCart manages the preparation of the download: makes sure the file exists, sends appropriate headers, then starts dumping the file in 8K chunks. CubeCart will send an explicit message saying the file does not exist. Doing it this way, CubeCart cannot command the web server to send the server's 404 page.

 

On the other hand, I see an error in CubeCart's coding. If a problem with starting a download occurs, the customer may not know why. Let me see if I can develop a quick fix for you. Be back shortly. (Are you skilled at editing files of PHP code?)

Link to comment
Share on other sites

In the file /classes/cubecart.class.php, near line 1693, there is the function _download(). About twelve lines later starts a switch() code block. Above the statement:

case FM_DL_ERROR_EXPIRED;
add:
case FM_DL_ERROR_NOFILE;
  $message    = "The file for this download could not be found.";
break;
case FM_DL_ERROR_NOPRODUCT;
  $message    = "The requested download is not associated with any product.";
break;
case FM_DL_ERROR_NORECORD;
  $message    = "The accesskey code for this download does not exist.";
break;
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
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...