- Posts: 7
- Thank you received: 0
Virtual7Downloadable products
11 years 8 months ago #186486
by Butlerweb
Virtual7Downloadable products was created by Butlerweb
-- HikaShop version -- : 2.3.5
-- Joomla version -- : 2.5.28
-- Browser(s) name and version -- : Chrome
Hi there
Im trying to create a new group of virtual products consisting of MP3's and movies. But I don't want the customers to be able to se the true URL. Preferable a URL that is time limited, but this isn't a necessity.
BUT... I can't figure out how! When I try I can only send the TRUE URL to the customer as a link, and that enables them to forward the e-mail and "share" the product.
How do I create the random URL for the products?
Brgds. Jacob
-- Joomla version -- : 2.5.28
-- Browser(s) name and version -- : Chrome
Hi there
Im trying to create a new group of virtual products consisting of MP3's and movies. But I don't want the customers to be able to se the true URL. Preferable a URL that is time limited, but this isn't a necessity.
BUT... I can't figure out how! When I try I can only send the TRUE URL to the customer as a link, and that enables them to forward the e-mail and "share" the product.
How do I create the random URL for the products?
Brgds. Jacob
Please Log in or Create an account to join the conversation.
11 years 8 months ago #186490
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Virtual7Downloadable products
Hi,
When you use files in products ; these files are send by HikaShop.
It means that the url will be an HikaShop url and the system will check that the user has right buy the product in order to send him the file.
So the system does not work if you specify an URL ; because HikaShop after his checks will redirect the customer to the specify url and the customer will be able to retrieve final path.
HikaShop is also compatible with "x-send" which is a special feature of some web servers ; it allow to send big files without providing the final URL to the customer.
Otherwise it is possible using a custom plugin to generate dynamically the URL.
www.hikashop.com/support/support/documen...onBeforeDownloadFile
I used that trigger some times ago for a plugin to to add the support of "lighttpd secure download".
Regards,
When you use files in products ; these files are send by HikaShop.
It means that the url will be an HikaShop url and the system will check that the user has right buy the product in order to send him the file.
So the system does not work if you specify an URL ; because HikaShop after his checks will redirect the customer to the specify url and the customer will be able to retrieve final path.
HikaShop is also compatible with "x-send" which is a special feature of some web servers ; it allow to send big files without providing the final URL to the customer.
www.hikashop.com/support/support/documen...ashop-changelog.htmlWe added the support of mod_xsendfile so that HikaShop can send its files via mod_xsendfile and avoid issues with big files and serve files faster
Otherwise it is possible using a custom plugin to generate dynamically the URL.
www.hikashop.com/support/support/documen...onBeforeDownloadFile
I used that trigger some times ago for a plugin to to add the support of "lighttpd secure download".
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: Butlerweb
Please Log in or Create an account to join the conversation.
11 years 8 months ago #187312
by Butlerweb
Replied by Butlerweb on topic Virtual7Downloadable products
OK, I was able to create the products and they work great with an obscured URL.
However some of the files are video files with a size of app. 1 Gb. I can't upload them via the backend, so I upload them via FTP. No problem, but... when I want to add file and sets file mode and enter the true file path and presses OK I receive a white/blank screen.
Why the blank screen?
However some of the files are video files with a size of app. 1 Gb. I can't upload them via the backend, so I upload them via FTP. No problem, but... when I want to add file and sets file mode and enter the true file path and presses OK I receive a white/blank screen.
Why the blank screen?
Please Log in or Create an account to join the conversation.
11 years 8 months ago #187320
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Virtual7Downloadable products
Hi,
The blank screen is because the system does not allow the file path due to some security checks.
See; www.hikashop.com/forum/product-category-...-product.html#186480
Regards,
The blank screen is because the system does not allow the file path due to some security checks.
See; www.hikashop.com/forum/product-category-...-product.html#186480
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
11 years 8 months ago - 11 years 8 months ago #187502
by Butlerweb
Replied by Butlerweb on topic Virtual7Downloadable products
Hi Jerome
I have changed the following acc. to your link ( www.hikashop.com/forum/product-category-...-product.html#186480 ). But it makes my entire screen go white when I go to products in backend :blush:
See line 419:
I have changed the following acc. to your link ( www.hikashop.com/forum/product-category-...-product.html#186480 ). But it makes my entire screen go white when I go to products in backend :blush:
See line 419:
This attachment is hidden for guests.
Please log in or register to see it.
Please log in or register to see it.
Code:
/*$config =& hikashop_config();
$clean_filename = JPath::clean($file->file_path);
$secure_path = $config->get('uploadsecurefolder');
if((JPATH_ROOT != '') && strpos($clean_filename, JPath::clean(JPATH_ROOT)) !== 0 && strpos($clean_filename, JPath::clean($secure_path)) !== 0)
return false;*/
if(substr($file->file_path, 0, 7) != 'http://' && substr($file->file_path, 0, 8) != 'https://') {
$config =& hikashop_config();
$clean_filename = JPath::clean($file->file_path);
$secure_path = $config->get('uploadsecurefolder');
if((JPATH_ROOT != '') && strpos($clean_filename, JPath::clean(JPATH_ROOT)) !== 0 && strpos($clean_filename, JPath::clean($secure_path)) !== 0)
return false;
Last edit: 11 years 8 months ago by Jerome. Reason: [code] is nice
Please Log in or Create an account to join the conversation.
11 years 8 months ago #187525
by Xavier
Replied by Xavier on topic Virtual7Downloadable products
Hi,
Please set the Joomla error reporting level to "maximum" it will display a php error, and this will give us more informations.
The issue is potentially coming from a missing ending tag "}".
Please set the Joomla error reporting level to "maximum" it will display a php error, and this will give us more informations.
The issue is potentially coming from a missing ending tag "}".
Please Log in or Create an account to join the conversation.
Time to create page: 0.204 seconds