DarwinUK Posted June 25, 2018 Share Posted June 25, 2018 Hello Everyone. Im going to bore you here with loads of details just to ask a simple question. I have my own web domain with a shopfront using cubecart. Fantastic ecommerce guys. Ive tried x-cart and magento, and basically magento was tooooo technical, you needed to know everything, whereas cubecart has a more user friendly frontend so you dont really have to worry about the backend. Ive setup a home intranet server mainly as a backup of my websites, but I also wanted plex and a working copy of my shopfront. So far all works perfectly. The server is currently running Ubuntu 18.04 I wanted to mess with digital downloads and have uploaded four mp3 files to /var/www/html/shop/downloads/music I have setup the digital products within my store, and everything goes through smoothly, emails are sent to admin and the customer. But how do I setup the digital download link which should be sent in the customers email ? I bet 1 GBP that this is a really stupid question, and that the answer is just checking a box somewhere. Thanks Phillip I should have also added that in the digital page of the product, at the bottom is a box called "Custom File Path". Ive entered http://192.168.1.100/shop/downloads/music/song name . mp3 UPDATE. Just received the email with the download link. Openning the link in firefox opens the shop frontend with an error message The following errors were detected: It has not been possible to locate the download file. Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 25, 2018 Share Posted June 25, 2018 So close! The Custom File Path must be "reachable" by the customer. There are three options: use the File Picker to locate a file within CubeCart's /files/ directory, give a full path to the file as it sits where CubeCart can fopen("file"), or give a fully qualified domain address. For /var/www/html/shop/downloads/music/file1.mp3, CubeCart must be on the same server and PHP be given permission to access it (open_basedir and safe_mode will cause problems). Thus, the file need not be in /shop/downloads/. For http://192.168.1.100/shop/downloads/music/song/file1.mp3, CubeCart will send this URL as a redirect target to the web browser. The browser then requests the file just like any other page request. The URL must be reachable by the browser and the request be fullfilled by a web server. Thus, we recommend https://www.doodlesbydarwinuk.com/shop/downloads/ and not the publically inaccessable 192.168 subnet. Well, I lost the bet because this is not a stupid question. Quote Link to comment Share on other sites More sharing options...
DarwinUK Posted June 26, 2018 Author Share Posted June 26, 2018 Hi bsmither. Your answer made me upload the files to my own website, where I also have cubecart installed and a nice shopfront already running. Changing the url within the product to direct to a physical online location gets me one step closer. In the email is a link, clicking on the link opens my cubecart customer portal page (on the intranet server), an error is displayed that the file still cant be found, but there is now buttons to click for download, but alas poor oric no file. So although it doesnt work if the shopfront is on an intranet server at least Ive had fun finding out. So a big thankyou for your help. Phillip Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.