Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
I think this should no be there.
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
2010-03-08 20:01:16 - PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in C:\wamp\www\opencart-1-4-1\admin\controller\tool\backup.php on line 13
open the sql file up and check if there is any sql in the file.muflon wrote:I'm not sure if this is a bug or only my problem but when I want to restore database from 1.3.4 in admin I get succesful message but no data is imported. in error log I get
2010-03-08 20:01:16 - PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in C:\wamp\www\opencart-1-4-1\admin\controller\tool\backup.php on line 13
OpenCart®
Project Owner & Developer.
Reason: Splitted form OpenCart 1.4.1
Best Regards,
David Catherall,
AireTech IT.
/admin/model/catalog/product.php
public function getProducts
Code: Select all
if (isset($data['filter_name']) && !is_null($data['filter_name'])) {
$sql .= " AND pd.name LIKE '%" . $this->db->escape($data['filter_name']) . "%'";
}
if (isset($data['filter_model']) && !is_null($data['filter_model'])) {
$sql .= " AND p.model LIKE '%" . $this->db->escape($data['filter_model']) . "%'";
}
Code: Select all
if (isset($data['filter_name']) && !is_null($data['filter_name'])) {
$sql .= " AND LCASE(pd.name) LIKE '%" . $this->db->escape(strtolower($data['filter_name'])) . "%'";
}
if (isset($data['filter_model']) && !is_null($data['filter_model'])) {
$sql .= " AND LCASE(p.model) LIKE '%" . $this->db->escape(strtolower($data['filter_model'])) . "%'";
}
-Ryan
First... Really nice work! Thanks Daniel!
The rtrim() function on line 93-100 in index.php does not work properly on windows and apache.
if you use:
rtrim(dirname($_SERVER['PHP_SELF']), '/')
you will end up with a backslash breaking things. I think it would be better to use:
rtrim(dirname($_SERVER['PHP_SELF']), '/.\\')
I also added a dot since a path without slashes returns a dot.
I think that should work in most environments.
Best regards,
Leffe
/catalog/controller/product/search.php
/catalog/controller/product/category.php
/catalog/controller/product/manufacturer.php
/catalog/controller/product/product.php
/catalog/controller/product/special.php
/catalog/controller/checkout/cart.php
/catalog/controller/common/home.php
/catalog/controller/module/bestseller.php
Code: Select all
if ($result['image']) {
$image = $result['image'];
} else {
$image = 'no_image.jpg';
}
Code: Select all
if ($result['image'] && file_exists(DIR_IMAGE . $result['image'])) {
$image = $result['image'];
} else {
$image = 'no_image.jpg';
}
-Ryan
PHP already comes with a predefined CONSTANT called "DIRECTORY_SEPARATOR"Blueforce wrote:Hi there!
First... Really nice work! Thanks Daniel!
The rtrim() function on line 93-100 in index.php does not work properly on windows and apache.
if you use:
rtrim(dirname($_SERVER['PHP_SELF']), '/')
you will end up with a backslash breaking things. I think it would be better to use:
rtrim(dirname($_SERVER['PHP_SELF']), '/.\\')
I also added a dot since a path without slashes returns a dot.
I think that should work in most environments.
Best regards,
Leffe
That constant will match \\ for windows and / for *nix automatically. This is what should be used to cover all bases.
If you dislike the length of that, as it is quite an eye sore. I added:
DEFINE ('DS', DIRECTORY_SEPARATOR);
in some of my other projects just to make use of "DS" as it is much cleaner looking.
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
Your question should be in the OpenCart 1.4.1 release topicXsecrets wrote:Not really a bug, but I was just wondering why the link for affiliates in the admin? Is there or was there an affiliate system in development?
Daniel wrote:I'm going to add Affiliates modules their. people sign up to sites like commision junction. you enter your username and password and affliate code. The code is loaded on the front end and will alert the aaffliate program you have joid whenever you get a sale.
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
-Ryan
.../opencart/index.php?route=product/product&path=35&product_id=50
Of course, if I remove the 'amp;' from the URL it will work fine.
This function worked very well in version 1.4.0, which makes me wonder if it's something I might have done. Anyone else noticing this?
Yes, and it is nothing made by you.RonA wrote:From the product description page, if I change the currency type I receive a 'Product Not Found'. Apparently, it has something to do with the ampersand in the URL:
.../opencart/index.php?route=product/product&path=35&product_id=50
Of course, if I remove the 'amp;' from the URL it will work fine.
This function worked very well in version 1.4.0, which makes me wonder if it's something I might have done. Anyone else noticing this?
URL composing has changed in 1.4.1.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Same bug in 1.4.2, I got it working with your solution (I'm on win vista and apache)Blueforce wrote:Hi there!
First... Really nice work! Thanks Daniel!
The rtrim() function on line 93-100 in index.php does not work properly on windows and apache.
if you use:
rtrim(dirname($_SERVER['PHP_SELF']), '/')
you will end up with a backslash breaking things. I think it would be better to use:
rtrim(dirname($_SERVER['PHP_SELF']), '/.\\')
I also added a dot since a path without slashes returns a dot.
I think that should work in most environments.
Best regards,
Leffe
Thanks Blueforce,
Regards
You can of course use my example but I actually agree with Qphoria that the right solution is what he suggested. The predefined constant DIRECTORY_SEPARATOR is the right way to go, but I think the result is the same in either way - Please correct me if I'm wrong here!
Best regards,
Leffe
Users browsing this forum: No registered users and 156 guests