1. Luke
  2. Joomla! Extensions
  3. Wednesday, 18 September 2019
Hi, I have Simple File Upload plugin installed on my Joomla site. It works fine, the customer can upload a file when checking out on the website. However, once they fill in all of their billing and shipping details and click confirm purchase, the following error message appears (see attachment).

error message.png

However, when this plugin is disabled and they follow the same checkout process and click confirm purchase, the order goes through absolutely fine.

I would be extremely grateful if someone could offer advice on fixing this issue/bug.

Thank you in advance.
Attachments (1)
References
  1. http://new.engravedmemorialsuk.com/
Responses (11)
David Zirhut Accepted Answer Pending Moderation
Hello,
important information is about the versions.
What is the version of this plugin? (should be the latest - currently 1.4)
What is the version of VirtueMart?
What is the version of Joomla!?
What is the version of PHP?

You may try to replace the line:
$session = JSession::getInstance();
by this:
$session = JFactory::getSession();

Regards
Linelab support
  1. more than a month ago
  2. Joomla! Extensions
  3. # 1
Luke Accepted Answer Pending Moderation
Hello,
important information is about the versions.
What is the version of this plugin? (should be the latest - currently 1.4)
What is the version of VirtueMart?
What is the version of Joomla!?
What is the version of PHP?

You may try to replace the line:
$session = JSession::getInstance();
by this:
$session = JFactory::getSession();

Regards
Linelab support


Thank you for your help!

That certainly allows for the customer to then complete the order and be sent to the payment page. However, before the payment page loads a warning message flashes up showing:

warning message.png

Is there any way of removing this?

Your help is appreciated so far. Thanks again!
Attachments (1)
  1. more than a month ago
  2. Joomla! Extensions
  3. # 2
David Zirhut Accepted Answer Pending Moderation
There is setting named "Files directory to store"
There must be the path of the folder where to attachments are stored.
It must be absolute path (similar to the variable $log_path or $tmp_path in the file configuration.php)

Regards
David - Linelab support
  1. more than a month ago
  2. Joomla! Extensions
  3. # 3
Luke Accepted Answer Pending Moderation
There is setting named "Files directory to store"
There must be the path of the folder where to attachments are stored.
It must be absolute path (similar to the variable $log_path or $tmp_path in the file configuration.php)

Regards
David - Linelab support


Hi David
Thank you for your response.
I am not sure how to create this path. Sorry, is there a simple way in which this can be done?

Regards
Luke
  1. more than a month ago
  2. Joomla! Extensions
  3. # 4
David Zirhut Accepted Answer Pending Moderation
1) Create some folder where you want to store the files. Let us say I have created the folder named "virtuemart_uploads" in the root of website.
2) Open the configuration file configuration.php and find there the line which begins $tmp_path.
I have there (in local machine) this:
public $tmp_path = '/var/www/html/tmp';
3) the final path to set in the plugin (in this case) is:
/var/www/html/virtuemart_uploads
  1. more than a month ago
  2. Joomla! Extensions
  3. # 5
Luke Accepted Answer Pending Moderation
1) Create some folder where you want to store the files. Let us say I have created the folder named "virtuemart_uploads" in the root of website.
2) Open the configuration file configuration.php and find there the line which begins $tmp_path.
I have there (in local machine) this:
public $tmp_path = '/var/www/html/tmp';
3) the final path to set in the plugin (in this case) is:
/var/www/html/virtuemart_uploads


Hi David,

Really appreciate your help on this so far.

I have created in the root of the website a folder named "virtuemart_uploads".

I am now wanting to find exactly which line I should be putting the path on?

Here is where I believe it should be amongst. Just not exactly sure where and don't want to end up putting it in the wrong place.

$config = JFactory::getConfig();
$tmp_folder = $config->get('tmp_path').DIRECTORY_SEPARATOR.'fileinput';

switch ($params['subfolder_of_files']) {
case 'virtuemart_order_id':
$new_folder = $params['path_of_files'].'/'.$order['details']['BT']->virtuemart_order_id;
break;
case 'order_number':
$new_folder = $params['path_of_files'].'/'.$order['details']['BT']->order_number;
break;
}
$new_folder=str_replace('//','/',$new_folder);
if (!JFolder::exists($new_folder)) JFolder::create($new_folder);
$index_html='';
JFile::write($new_folder.'/index.html', $index_html);
if (JFile::exists($tmp_folder.'/'.$cf->tmp_filename)) {
JFile::move($tmp_folder.'/'.$cf->tmp_filename, $new_folder.'/'.$cf->filename);
}


Thank you again for your help

Kind Regard,

Luke
  1. more than a month ago
  2. Joomla! Extensions
  3. # 6
David Zirhut Accepted Answer Pending Moderation
hi
as I wrote in the previous post.

If the root path of root folder is (for example): /var/www/yourweb/
Then the path in the plugin should be:
/var/www/yourweb/virtuemart_uploads

If the path is different, the path for plugin setting is the different in the same way.

Regards
David
  1. more than a month ago
  2. Joomla! Extensions
  3. # 7
Luke Accepted Answer Pending Moderation
hi
as I wrote in the previous post.

If the root path of root folder is (for example): /var/www/yourweb/
Then the path in the plugin should be:
/var/www/yourweb/virtuemart_uploads

If the path is different, the path for plugin setting is the different in the same way.

Regards
David


Hi David,

I have followed your instructions the best I can understand.

Please see what I have entered.

Here is the root folder I created, as you suggested:
root folder.png

And then below is the Files Directory to Store details I entered:

Files directory to store.png

This reads /public_html/new/virtuemart_uploads

Yet when I check out and confirm the order it still shows the following message:
Joomla\CMS\Filesystem\Folder::create:Could not create folder.Path:/CGHN015

:(

Any help you can offer on this at all would be so so so appreciated!

Thank you again for your patience. My understanding of this isn't great so it is all good help from you.

Kind Regards,

Luke
Attachments (2)
  1. more than a month ago
  2. Joomla! Extensions
  3. # 8
David Zirhut Accepted Answer Pending Moderation
No, this path does not look like the root path of the website.
have a look at the file configuration.php (as I wrote before)
or in the global setting - there should be written the correct path
screenshot-localhost-2019.09.24-11_14_29.png
Attachments (1)
  1. more than a month ago
  2. Joomla! Extensions
  3. # 9
Luke Accepted Answer Pending Moderation
No, this path does not look like the root path of the website.
have a look at the file configuration.php (as I wrote before)
or in the global setting - there should be written the correct path
[attachment]screenshot-localhost-2019.09.24-11_14_29.png[/attachment]


Hi David,

I have found the path in global configuration:
path to temp folder.png

It reads: /home/beverl10/public_html/new/tmp

Then I go to Files Directory to Store details and entered:
Files directory to store2.png

Which reads exactly the same.

However I still get the warning message when confirming the order on the website.

Does anything still look to be incorrect when you look at the settings I have shown.

Thank you again.

Kind Regard,

Luke
Attachments (2)
  1. more than a month ago
  2. Joomla! Extensions
  3. # 10
Jang Young Accepted Answer Pending Moderation
Nice thread really helpful and it worked for me.
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.