Post by bull5-i » Mon Apr 23, 2012 5:32 pm

Released version 3.2.0:
  • Fixed: download tag sorting in admin
  • Fixed: download editing giving error that no filename is not correct
  • Added: administrative download tags which are not visible in the store front end
  • Added: resettable download counter - for free downloads you can also display the count publicly

|V|355 \/\/17|-| 7}{3 |3357, ... [you know the rest]

Commercial mods: New! Questions & Answers PRO - Admin Quick Edit PRO - Product Downloads PRO - Custom Product Tab PRO - New! Product Quick Edit Plus

All mods & extensions by me


Active Member

Posts

Joined
Tue Jan 11, 2011 8:49 pm

Post by bull5-i » Thu May 10, 2012 3:21 am

Released version 3.3.0:
  • Added: Apply button to save Product Downloads PRO settings without leaving the page
  • Fixed: Downloads displaying when customer group filtering was enabled
  • Fixed: Download pagination count in admin when filtering
  • Refactored some of the code

|V|355 \/\/17|-| 7}{3 |3357, ... [you know the rest]

Commercial mods: New! Questions & Answers PRO - Admin Quick Edit PRO - Product Downloads PRO - Custom Product Tab PRO - New! Product Quick Edit Plus

All mods & extensions by me


Active Member

Posts

Joined
Tue Jan 11, 2011 8:49 pm

Post by heykate » Mon May 21, 2012 10:31 pm

I have bought this extension, yet I don't see the area where to even make downloads free. Is there something else that needs to be installed or a setting I am missing? I am on v 1.5.1.3

Newbie

Posts

Joined
Mon May 21, 2012 10:28 pm

Post by bull5-i » Mon May 21, 2012 11:35 pm

Downloads can be made free on downloads list page or downloads edit page.

If after installing and enabling the extension and its various features you do not see the menu Catalog->Downloads->Downloads nor Catalog->Downloads->Download Tags appear, please check vQmod log file for an error report.
If you have other vQmods installed, chances are that one of them is in conflict with this extension. Try to remove the other vQmods to see if the extension starts to work at some point.

|V|355 \/\/17|-| 7}{3 |3357, ... [you know the rest]

Commercial mods: New! Questions & Answers PRO - Admin Quick Edit PRO - Product Downloads PRO - Custom Product Tab PRO - New! Product Quick Edit Plus

All mods & extensions by me


Active Member

Posts

Joined
Tue Jan 11, 2011 8:49 pm

Post by heykate » Tue May 22, 2012 2:32 am

Actually it was a setting to the user group for the admin is why i wasnt seeing the free download checkbox. Sorry about that.

but I am still encountering a problem. I have to downloads and I have the product and I assign the download to the specific product, but the downloads tab still wont show up on the product page. Its like I have some setting screwed up or something, and I tried following all the settings to the screenshot that were in the downloads folder but still no luck.

UPDATE: i did check the logs for the vqmod and this is a reoccuring error:

---------- Date: 2012-05-21 09:17:48 ~ IP : 10.0.51.110 ----------
REQUEST URI : /hazlitt/index.php
MOD DETAILS:
modFile : F:\Inetpub\wwwroot\hazlitt\components\com_aceshop\opencart\vqmod\xml\product_downloads.xml
id : Add freely downloadble files to your products + batch upload files from folders
version : 3.3.1
vqmver : 1.0.7
author : rmg
SEARCH NOT FOUND (ABORTING MOD): </head>

----------------------------------------------------------------------



Any insight on this would be appreciated,

Thanks,
kate

Newbie

Posts

Joined
Mon May 21, 2012 10:28 pm

Post by bull5-i » Tue May 22, 2012 3:15 am

This means that the line "</head>" is not found in the header.tpl file. You need to alter the product_downloads.xml script so it can complete the change.

|V|355 \/\/17|-| 7}{3 |3357, ... [you know the rest]

Commercial mods: New! Questions & Answers PRO - Admin Quick Edit PRO - Product Downloads PRO - Custom Product Tab PRO - New! Product Quick Edit Plus

All mods & extensions by me


Active Member

Posts

Joined
Tue Jan 11, 2011 8:49 pm

Post by heykate » Tue May 22, 2012 3:42 am

but </head> is in the header.tpl file. Do i need to just remove the call to the </head> in the script then, what needs to be changed in the script for it to work properly? Should I also mention this open cart is inside a Joomla site?

Thanks
Kate

Newbie

Posts

Joined
Mon May 21, 2012 10:28 pm

Post by bull5-i » Tue May 22, 2012 4:25 am

If </head> exists in the original header.tpl, but not in the final cached version, then it must be another vQmod script that modifies the header file before Product Downloads PRO script gets executed. If you're using AceShop, I wouldn't be too surprised if that is the root of all evil.

|V|355 \/\/17|-| 7}{3 |3357, ... [you know the rest]

Commercial mods: New! Questions & Answers PRO - Admin Quick Edit PRO - Product Downloads PRO - Custom Product Tab PRO - New! Product Quick Edit Plus

All mods & extensions by me


Active Member

Posts

Joined
Tue Jan 11, 2011 8:49 pm

Post by heykate » Tue May 22, 2012 4:36 am

OMG I am.

is there a way to change the order the of the vqmods that are getting executed then? are you saying not using AceShop would solve this?

Newbie

Posts

Joined
Mon May 21, 2012 10:28 pm

Post by bull5-i » Tue May 22, 2012 4:42 am

Using it on plain OpenCart would definitely make it work. However, if you need to get it to work with AceShop I could provide paid integration service to work out a custom solution for you. PM me for a quote.

|V|355 \/\/17|-| 7}{3 |3357, ... [you know the rest]

Commercial mods: New! Questions & Answers PRO - Admin Quick Edit PRO - Product Downloads PRO - Custom Product Tab PRO - New! Product Quick Edit Plus

All mods & extensions by me


Active Member

Posts

Joined
Tue Jan 11, 2011 8:49 pm

Post by bull5-i » Tue Jun 05, 2012 7:01 pm

Released version 3.4.0:
  • Added: Option to delete the file from file system when deleting the download
  • Added: AJAX based file uploading with progress bar and large file support

|V|355 \/\/17|-| 7}{3 |3357, ... [you know the rest]

Commercial mods: New! Questions & Answers PRO - Admin Quick Edit PRO - Product Downloads PRO - Custom Product Tab PRO - New! Product Quick Edit Plus

All mods & extensions by me


Active Member

Posts

Joined
Tue Jan 11, 2011 8:49 pm

Post by heykate » Fri Jun 08, 2012 1:31 am

Is there a way to have the dowload button located with the product image on the main category page with the other products listed in the category?

For example, lets say my category is MOVIES, then I would go to Movies category and see all the movies listed, along with their download link without having to actually go the the actually product page?

Any help would be grateful,

Thanks,
Kate

Newbie

Posts

Joined
Mon May 21, 2012 10:28 pm

Post by bull5-i » Fri Jun 08, 2012 1:40 am

It would require custom approach.
If you have several downloads associated with the product then it would not scale well.

|V|355 \/\/17|-| 7}{3 |3357, ... [you know the rest]

Commercial mods: New! Questions & Answers PRO - Admin Quick Edit PRO - Product Downloads PRO - Custom Product Tab PRO - New! Product Quick Edit Plus

All mods & extensions by me


Active Member

Posts

Joined
Tue Jan 11, 2011 8:49 pm

Post by bull5-i » Fri Jun 08, 2012 6:05 pm

Released version 3.4.1:
  • Fixed: compatibility with PHP < 5.3.0
  • Fixed: a JavaScript file uploading issue

|V|355 \/\/17|-| 7}{3 |3357, ... [you know the rest]

Commercial mods: New! Questions & Answers PRO - Admin Quick Edit PRO - Product Downloads PRO - Custom Product Tab PRO - New! Product Quick Edit Plus

All mods & extensions by me


Active Member

Posts

Joined
Tue Jan 11, 2011 8:49 pm

Post by skyer2000 » Fri Jul 20, 2012 12:46 am

Here are some improvements I recommend to the code. These changes convert all filenames to lowercase and removes all special characters (including spaces). This is important as it ensures that filenames compatible with all servers.

Changes in /admin/controller/catalog/download_ext.php:

Find: $file_name = trim(basename(stripslashes($name)), ".\x00..\x20");
Below line add: $file_name = trim(preg_replace('/[^a-z0-9]+/', '-', strtolower($file_name)), '-');

Find: $file->mask = $file->name;
Replace with: $file->mask = $name;

Find: $ok = @rename($file_path, $file_path . '.' . $ext);
Replace with: $ok = @rename($file_path, $file_path . '-' . $ext);

Find 2 instances of: $filename = pathinfo($file, PATHINFO_BASENAME) . '.' . md5(rand());
Replace with: $filename = trim(preg_replace('/[^a-z0-9]+/', '-', strtolower(pathinfo($file, PATHINFO_BASENAME))), '-') . '-' . md5(rand());


I also made a little change to how the file name is generated use mask when a user downloads. Right now it converts any special characters such as & into & in the filename. I am only checking for & since it is all I require in my store, however this could be done in a much better way.

Changes in catalog/controller/product/download.php

Find: $mask = basename($download_info['mask']);
Replace with: $mask = str_replace('&','and',basename($download_info['mask']));

Here is the relevant VQMod code:

Code: Select all

<file name="admin/controller/catalog/download_ext.php">
		<operation>
			<search position="after"><![CDATA[$file_name = trim(basename(stripslashes($name)), ".\x00..\x20");]]></search>
			<add><![CDATA[$file_name = trim(preg_replace('/[^a-z0-9]+/', '-', strtolower($file_name)), '-');]]></add>
		</operation>
		<operation>
			<search position="replace"><![CDATA[$file->mask = $file->name;]]></search>
			<add><![CDATA[$file->mask = $name;]]></add>
		</operation>
		<operation>
			<search position="replace"><![CDATA[$ok = @rename($file_path, $file_path . '.' . $ext);]]></search>
			<add><![CDATA[$ok = @rename($file_path, $file_path . '-' . $ext);]]></add>
		</operation>
		<operation>
			<search position="replace"><![CDATA[$filename = pathinfo($file, PATHINFO_BASENAME) . '.' . md5(rand());]]></search>
			<add><![CDATA[$filename = trim(preg_replace('/[^a-z0-9]+/', '-', strtolower(pathinfo($file, PATHINFO_BASENAME))), '-') . '-' . md5(rand());]]></add>
		</operation>
	</file>
	
	<!-- better handling of filename on product download -->
	<file name="catalog/controller/product/download.php">
		<operation>
			<search position="replace"><![CDATA[$mask = basename($download_info['mask']);]]></search>
			<add><![CDATA[$mask = str_replace('&','and',basename($download_info['mask']));]]></add>
		</operation>
	</file>

New member

Posts

Joined
Fri Jul 17, 2009 10:27 am

Post by taylorjes » Fri Jul 27, 2012 2:04 am

Hi,

I've purchased an install PD Pro and everything seems to be working correctly; however, I am getting an error in my log:

PHP Notice: Undefined variable: setting in /public_html/admin/model/setting/setting.php on line 12
PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /public_html/admin/view/template/module/product_downloads.tpl on line 239
PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /public_html/admin/view/template/module/product_downloads.tpl on line 239
PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /public_html/admin/view/template/module/product_downloads.tpl on line 239

/public_html/admin/model/setting/setting.php line 12 block

Code: Select all

foreach ($query->rows as $result) {
	if (!$result['serialized']) {
		$data[$result['key']] = $result['value'];
	} else {
		$data[$result['key']] = unserialize($setting['value']);
	}
}
/public_html/admin/view/template/module/product_downloads.tpl line 239 block

Code: Select all

<div class="<?php echo $class; ?>">
  <?php if (in_array($group['customer_group_id'], $pd_customer_groups)) { ?>
    <input type="checkbox" name="pd_customer_groups[]" value="<?php echo $group['customer_group_id']; ?>" checked="checked" />
    <?php echo $group['name']; ?>
  <?php } else { ?>
    <input type="checkbox" name="pd_customer_groups[]" value="<?php echo $group['customer_group_id']; ?>" />
    <php echo $group['name']; ?>
  <?php } ?>
</div>
Is this effecting anything? I have customized part of the code for my template, but nothing in admin area.

taylorjes

Newbie

Posts

Joined
Thu Jan 19, 2012 8:11 am

Post by bull5-i » Fri Jul 27, 2012 2:33 am

It should not affect anything.

|V|355 \/\/17|-| 7}{3 |3357, ... [you know the rest]

Commercial mods: New! Questions & Answers PRO - Admin Quick Edit PRO - Product Downloads PRO - Custom Product Tab PRO - New! Product Quick Edit Plus

All mods & extensions by me


Active Member

Posts

Joined
Tue Jan 11, 2011 8:49 pm

Post by bull5-i » Sun Aug 12, 2012 4:54 am

@skyer2000: I plan to improve file name sanitization in the next release

|V|355 \/\/17|-| 7}{3 |3357, ... [you know the rest]

Commercial mods: New! Questions & Answers PRO - Admin Quick Edit PRO - Product Downloads PRO - Custom Product Tab PRO - New! Product Quick Edit Plus

All mods & extensions by me


Active Member

Posts

Joined
Tue Jan 11, 2011 8:49 pm

Post by dither » Sat Aug 18, 2012 8:52 am

@ bull5-i please check this out and tell me what you think.

Hi I have the same issue as previously mentioned:
PHP Warning: in_array() expects parameter 2 to be array, string given in /some_long_path/admin/view/template/module/product_downloads.tpl on line 241

Although the problem seems harmless, it fills the error log with the same amount of lines as the number of customer groups you have - e.g 9 lines in my case - each time I press the save button ...

Anyway I have found this fix:
In admin/controller/module/product_downloads.php
At line 221, I've changed:

Code: Select all

$this->data['pd_customer_groups'] = $this->request->post['pd_customer_groups'];
to:

Code: Select all

$this->data['pd_customer_groups'] = unserialize($this->request->post['pd_customer_groups']);

New member

Posts

Joined
Sun Apr 29, 2012 12:40 pm

Post by bull5-i » Fri Aug 24, 2012 4:14 pm

@dither: This will be fixed in the next release.

|V|355 \/\/17|-| 7}{3 |3357, ... [you know the rest]

Commercial mods: New! Questions & Answers PRO - Admin Quick Edit PRO - Product Downloads PRO - Custom Product Tab PRO - New! Product Quick Edit Plus

All mods & extensions by me


Active Member

Posts

Joined
Tue Jan 11, 2011 8:49 pm
Who is online

Users browsing this forum: No registered users and 225 guests