Jump to content

Search the Community

Showing results for tags 'download'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • CubeCart News & Announcements
    • News & Announcements
  • CubeCart Support Forums
    • Issue / Bug Reporting & Feature Requests
    • Install & Upgrade Support
    • Official CubeCart Hosting
    • Technical Help
    • Customising Look & Feel
  • CubeCart Extension Marketplace
    • Visit the CubeCart Extension Marketplace
    • Extension Discussion
    • Developer Forum
  • General
    • General Discussion
    • Show Off

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location

Found 4 results

  1. This is for CubeCart 5.2.2 -- the edits should be the same, but maybe with nearby line numbers, for other versions. When the store owner administratively creates an order for a customer, and a digital product is added to that order, CubeCart does not attempt to also enable the ability for that customer to download that product. After performing the following edits: * When the admin moves the order from Pending to Processing (then, if this is a digital-only order, Cubecart moves it to Complete), CubeCart will email this message: Your Purchased Downloads with a viable link to the digital product. * The link will also appear in the customer's Account page, Digital Downloads section. I have not tested various permutations, such as, when adding a second digital product to a Completed order. Will emails be sent? What might happen to the existing digital product record in the CC_downloads table? Note: If you find that downloads are expiring immediately or in the past, make sure you have the following settings: * Store Settings, Stock tab, "Download expiry time (in seconds)" is blank or a number. * Store Settings, Advanced tab, correctly chosen the timezone you want your business to be operating in. Also, you may not need to enter anything here, but the "UTC Offset" is the number of seconds between where the server hosting your site is located and the time where your business is located: earlier (positive) or later (negative) than you. To get a good idea of what you need to put in this field, immediately after you log-in as an admin, got to the Staff Access Log. Calculate the number of hours you need to add or subtract from the time shown to get the time desired and multiply that by 3600. In the file, admin/sources/orders.index.inc.php: Near line 67: $GLOBALS['db']->update('CubeCart_order_inventory', $data, array('cart_order_id' => $order_id, 'id' => (int)$data['id'])); Add AFTER: // Updating a download not necessary (I hope) Near line 61: unset($record); } } // Update Products Add BEFORE: // Also insert a download if(isset($record['digital']) && $record['digital']) { $record['customer_id'] = (isset($_POST['customer']['customer_id']) && !empty($_POST['customer']['customer_id'])) ? (int)$_POST['customer']['customer_id'] : 0; $record['accesskey'] = md5($order_id.(int)$data['product_id'].date('cZ@u').mt_rand()); $record['expire'] = ($GLOBALS['config']->get('config', 'download_expire')>0) ? time() + $GLOBALS['config']->get('config', 'download_expire') : 0; $GLOBALS['db']->insert('CubeCart_downloads', $record); } Near line 60: $GLOBALS['db']->insert('CubeCart_order_inventory', $record); Change to: $record['order_inv_id'] = $GLOBALS['db']->insert('CubeCart_order_inventory', $record); // Capture inserted record id Near line 40: $GLOBALS['db']->delete('CubeCart_order_inventory', array('cart_order_id' => $order_id, 'id' => (int)$value)); Add AFTER: // Also remove from downloads $GLOBALS['db']->delete('CubeCart_downloads', array('cart_order_id' => $order_id, 'order_inv_id' => (int)$value));
  2. There are three aspects to a digital download's location: * as seen in the Digital Options file picker (Product, Digital tab) * the Custom File Path (Product, Digital tab) * the Custom Root File Path (Store Settings, Stock tab) -- not applicable to CC6 If you use the Custom File Path, all else is ignored. The value you enter here is taken exactly as entered. The term File Path, in this case, also means that there is a File Name attached. A fully qualified web address can also be used. (If a web address is used, Cubecart will send a 302 Redirect to have the browser download the file directly from that address. Normally, the web address of the Redirect is not visible to the casual browser user. But if the user is monitoring web traffic in and out of the browser, the address will be seen in the page request headers.) Examples: /home/username/private_dir/store_downloads/digital_file.mp3 (http, or https, or ftp)://www.storename.com/downloads_dir/digital_file.mp3 If you use the Custom Root File Path, this becomes the starting point that the Digital Options file picker list window uses to display directories and files, and the Downloads, Upload tab will deposit uploaded files. The term File Path, in this case, is just the path, with no trailing slash. Example: /home/username/private_dir/store_downloads If you do not use the Custom Root File Path, the starting point is the /files/ directory in the Cubecart installation that the Digital Options file picker list window uses to display directories and files, and the Downloads, Upload tab will deposit uploaded files. Except for the method used where the web address is sent to the browser in the 302 Redirect response, CubeCart will have PHP send the file, unmanaged, in 8KB chunks to the browser. (Unmanaged means there is no 'resuming' at the point of failure of a failed download.) At no point will the user be able to determine where the file is actually located. That said, if the starting point is somewhere inside the CubeCart installation, the file can be requested directly, if somehow known what the filename is. As such, it will be to your benefit to add an .htaccess file that prohibits directory listing, and prohibits direct access from everyone except a page request referred by your own store. These lines should suffice: Options -Indexes IndexIgnore * Order deny,allow Deny from all <FilesMatch "print.*.php$" > (See note) Allow from all </Files> Points to consider: The database table CubeCart_filemanager records the path, if there is one, relative to the file picker's starting point. If you upload files (in admin, Downloads, Upload tab), the files will be stored in the starting point folder. (On the Files tab, you may edit the file properties and change the file's location to a different sub-folder.) If you should open your store and not have entered a Custom Root File Path, have uploaded files (to /files/), then later decide to enter a Custom Root File Path (or change an existing path), you will need to use an FTP program to move the files and folders from where they are now to the new location. The FilesMatch directive could be written to allow any .php file. The expectation is that CubeCart (and third-party developers) will only put files here temporarily - and they will end in .php. All other file types, mp3, mov, pdf, doc, etc, will not be reachable by a web browser. My testing has shown there to be an issue with using a Custom Root File Path. When the file picker window lists the folder(s), I see two entries of the same folder name. (I only have one sub-folder at the starting point for my experiments.) (There is another issue with using a Custom Root File Path, which I think is related to a Windows-based server filesystem. Clicking on the folder name in the file picker window does nothing. It is important to enter the path not using backslashes: L:/WebServer/store_downloads. Backslashes will be removed. There is also an issue with the FileManager saving data to the CubeCart_filemanager table when the database is in strict mode. There will be a 500 Internal Server Error. These issues must be dealt with by someone other than Devellion.)
  3. I need someone to report on the arrangement of data in the CubeCart_downloads table. Specifically, I need this scenario: An order was placed with a digital download item in a CC4 store (make note of the cart_order_id) The CC4 store was upgraded to CC5 That downloadable item still exists in CC5's Cubecart_downloads table (scan for the cart_order_id) The exact question is: When examining the contents of the CubeCart_downloads table, at the record that has that digital item, is there a value in the 'order_inv_id' column?
  4. How do i set expiry date on digital downloads? I tested out buying a product (with a 100% off coupon), went to my account >> digital downloads And i found my download already expired. Downloads 0/0 i left the fields blank to disable expiry date and download attempts but it doesn't seem to be working.
×
×
  • Create New...