OpenCart 1.4.2 Bugs and Issues
Posted: Tue Mar 09, 2010 8:21 pm
Please post here all bugs (and those you think they are bugs) found in the release 1.4.2 from the 9th of March 2010.
OpenCart Community Forum - Discuss shopping cart and e-commerce solutions.
https://forum.opencart.com/
Code: Select all
define('HTTP_SERVER', 'http://' . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/') . '/');
Code: Select all
define('HTTP_SERVER', 'http://' . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/.\\') . '/');
Code: Select all
<?php foreach ($templates as $template) { ?>
<?php if ($template == $template) { ?>
<option value="<?php echo $template; ?>" selected="selected"><?php echo $template; ?></option>
<?php } else { ?>
<option value="<?php echo $template; ?>"><?php echo $template; ?></option>
<?php } ?>
<?php } ?>
Code: Select all
<?php foreach ($templates as $tmpl) { ?>
<?php if ($tmpl == $template) { ?>
<option value="<?php echo $tmpl; ?>" selected="selected"><?php echo $tmpl; ?></option>
<?php } else { ?>
<option value="<?php echo $tmpl; ?>"><?php echo $tmpl; ?></option>
<?php } ?>
<?php } ?>
Code: Select all
$query = $db->query("SELECT * FROM " . DB_PREFIX . "store WHERE url = '" . $db->escape(HTTP_SERVER) . "'");
Code: Select all
$query = $db->query("SELECT * FROM " . DB_PREFIX . "store WHERE url = '" . str_replace('www.', '', ($db->escape(HTTP_SERVER))) . "'");
Code: Select all
$this->db->query("INSERT INTO " . DB_PREFIX . "store SET name = '" . $this->db->escape($data['name']) . "', url = '" . $this->db->escape($data['url']) . "', title = '" . $this->db->escape($data['title']) . "', meta_description = '" . $this->db->escape($data['meta_description']) . "', template = '" . $this->db->escape($data['template']) . "', country_id = '" . (int)$data['country_id'] . "', zone_id = '" . (int)$data['zone_id'] . "', language = '" . $this->db->escape($data['language']) . "', currency = '" . $this->db->escape($data['currency']) . "', tax = '" . (int)$data['tax'] . "', customer_group_id = '" . (int)$data['customer_group_id'] . "', customer_price = '" . (int)$data['customer_price'] . "', customer_approval = '" . (int)$data['customer_approval'] . "', guest_checkout = '" . (int)$data['guest_checkout'] . "', account_id = '" . (int)$data['account_id'] . "', checkout_id = '" . (int)$data['checkout_id'] . "', stock_display = '" . (int)$data['stock_display'] . "', stock_check = '" . (int)$data['stock_check'] . "', stock_checkout = '" . (int)$data['stock_checkout'] . "', stock_subtract = '" . (int)$data['stock_subtract'] . "', order_status_id = '" . (int)$data['order_status_id'] . "', stock_status_id = '" . (int)$data['stock_status_id'] . "', logo = '" . $this->db->escape($data['logo']) . "', icon = '" . $this->db->escape($data['icon']) . "', image_thumb_width = '" . (int)$data['image_thumb_width'] . "', image_thumb_height = '" . (int)$data['image_thumb_height'] . "', image_popup_width = '" . (int)$data['image_popup_width'] . "', image_popup_height = '" . (int)$data['image_popup_height'] . "', image_category_width = '" . (int)$data['image_category_width'] . "', image_category_height = '" . (int)$data['image_category_height'] . "', image_product_width = '" . (int)$data['image_product_width'] . "', image_product_height = '" . (int)$data['image_product_height'] . "', image_additional_width = '" . (int)$data['image_additional_width'] . "', image_additional_height = '" . (int)$data['image_additional_height'] . "', image_related_width = '" . (int)$data['image_related_width'] . "', image_related_height = '" . (int)$data['image_related_height'] . "', image_cart_width = '" . (int)$data['image_cart_width'] . "', image_cart_height = '" . (int)$data['image_cart_height'] . "'");
Code: Select all
$this->db->query("INSERT INTO " . DB_PREFIX . "store SET name = '" . $this->db->escape($data['name']) . "', url = '" . str_replace('www.', '', ($this->db->escape($data['url']))) . "', title = '" . $this->db->escape($data['title']) . "', meta_description = '" . $this->db->escape($data['meta_description']) . "', template = '" . $this->db->escape($data['template']) . "', country_id = '" . (int)$data['country_id'] . "', zone_id = '" . (int)$data['zone_id'] . "', language = '" . $this->db->escape($data['language']) . "', currency = '" . $this->db->escape($data['currency']) . "', tax = '" . (int)$data['tax'] . "', customer_group_id = '" . (int)$data['customer_group_id'] . "', customer_price = '" . (int)$data['customer_price'] . "', customer_approval = '" . (int)$data['customer_approval'] . "', guest_checkout = '" . (int)$data['guest_checkout'] . "', account_id = '" . (int)$data['account_id'] . "', checkout_id = '" . (int)$data['checkout_id'] . "', stock_display = '" . (int)$data['stock_display'] . "', stock_check = '" . (int)$data['stock_check'] . "', stock_checkout = '" . (int)$data['stock_checkout'] . "', stock_subtract = '" . (int)$data['stock_subtract'] . "', order_status_id = '" . (int)$data['order_status_id'] . "', stock_status_id = '" . (int)$data['stock_status_id'] . "', logo = '" . $this->db->escape($data['logo']) . "', icon = '" . $this->db->escape($data['icon']) . "', image_thumb_width = '" . (int)$data['image_thumb_width'] . "', image_thumb_height = '" . (int)$data['image_thumb_height'] . "', image_popup_width = '" . (int)$data['image_popup_width'] . "', image_popup_height = '" . (int)$data['image_popup_height'] . "', image_category_width = '" . (int)$data['image_category_width'] . "', image_category_height = '" . (int)$data['image_category_height'] . "', image_product_width = '" . (int)$data['image_product_width'] . "', image_product_height = '" . (int)$data['image_product_height'] . "', image_additional_width = '" . (int)$data['image_additional_width'] . "', image_additional_height = '" . (int)$data['image_additional_height'] . "', image_related_width = '" . (int)$data['image_related_width'] . "', image_related_height = '" . (int)$data['image_related_height'] . "', image_cart_width = '" . (int)$data['image_cart_width'] . "', image_cart_height = '" . (int)$data['image_cart_height'] . "'");
Code: Select all
$this->db->query("UPDATE " . DB_PREFIX . "store SET name = '" . $this->db->escape($data['name']) . "', url = '" . $this->db->escape($data['url']) . "', title = '" . $this->db->escape($data['title']) . "', meta_description = '" . $this->db->escape($data['meta_description']) . "', template = '" . $this->db->escape($data['template']) . "', country_id = '" . (int)$data['country_id'] . "', zone_id = '" . (int)$data['zone_id'] . "', language = '" . $this->db->escape($data['language']) . "', currency = '" . $this->db->escape($data['currency']) . "', tax = '" . (int)$data['tax'] . "', customer_group_id = '" . (int)$data['customer_group_id'] . "', customer_price = '" . (int)$data['customer_price'] . "', customer_approval = '" . (int)$data['customer_approval'] . "', guest_checkout = '" . (int)$data['guest_checkout'] . "', account_id = '" . (int)$data['account_id'] . "', checkout_id = '" . (int)$data['checkout_id'] . "', stock_display = '" . (int)$data['stock_display'] . "', stock_check = '" . (int)$data['stock_check'] . "', stock_checkout = '" . (int)$data['stock_checkout'] . "', stock_subtract = '" . (int)$data['stock_subtract'] . "', order_status_id = '" . (int)$data['order_status_id'] . "', stock_status_id = '" . (int)$data['stock_status_id'] . "', logo = '" . $this->db->escape($data['logo']) . "', icon = '" . $this->db->escape($data['icon']) . "', image_thumb_width = '" . (int)$data['image_thumb_width'] . "', image_thumb_height = '" . (int)$data['image_thumb_height'] . "', image_popup_width = '" . (int)$data['image_popup_width'] . "', image_popup_height = '" . (int)$data['image_popup_height'] . "', image_category_width = '" . (int)$data['image_category_width'] . "', image_category_height = '" . (int)$data['image_category_height'] . "', image_product_width = '" . (int)$data['image_product_width'] . "', image_product_height = '" . (int)$data['image_product_height'] . "', image_additional_width = '" . (int)$data['image_additional_width'] . "', image_additional_height = '" . (int)$data['image_additional_height'] . "', image_related_width = '" . (int)$data['image_related_width'] . "', image_related_height = '" . (int)$data['image_related_height'] . "', image_cart_width = '" . (int)$data['image_cart_width'] . "', image_cart_height = '" . (int)$data['image_cart_height'] . "' WHERE store_id = '" . (int)$store_id . "'");
Code: Select all
$this->db->query("UPDATE " . DB_PREFIX . "store SET name = '" . $this->db->escape($data['name']) . "', url = '" . str_replace('www.', '', ($this->db->escape($data['url']))) . "', title = '" . $this->db->escape($data['title']) . "', meta_description = '" . $this->db->escape($data['meta_description']) . "', template = '" . $this->db->escape($data['template']) . "', country_id = '" . (int)$data['country_id'] . "', zone_id = '" . (int)$data['zone_id'] . "', language = '" . $this->db->escape($data['language']) . "', currency = '" . $this->db->escape($data['currency']) . "', tax = '" . (int)$data['tax'] . "', customer_group_id = '" . (int)$data['customer_group_id'] . "', customer_price = '" . (int)$data['customer_price'] . "', customer_approval = '" . (int)$data['customer_approval'] . "', guest_checkout = '" . (int)$data['guest_checkout'] . "', account_id = '" . (int)$data['account_id'] . "', checkout_id = '" . (int)$data['checkout_id'] . "', stock_display = '" . (int)$data['stock_display'] . "', stock_check = '" . (int)$data['stock_check'] . "', stock_checkout = '" . (int)$data['stock_checkout'] . "', stock_subtract = '" . (int)$data['stock_subtract'] . "', order_status_id = '" . (int)$data['order_status_id'] . "', stock_status_id = '" . (int)$data['stock_status_id'] . "', logo = '" . $this->db->escape($data['logo']) . "', icon = '" . $this->db->escape($data['icon']) . "', image_thumb_width = '" . (int)$data['image_thumb_width'] . "', image_thumb_height = '" . (int)$data['image_thumb_height'] . "', image_popup_width = '" . (int)$data['image_popup_width'] . "', image_popup_height = '" . (int)$data['image_popup_height'] . "', image_category_width = '" . (int)$data['image_category_width'] . "', image_category_height = '" . (int)$data['image_category_height'] . "', image_product_width = '" . (int)$data['image_product_width'] . "', image_product_height = '" . (int)$data['image_product_height'] . "', image_additional_width = '" . (int)$data['image_additional_width'] . "', image_additional_height = '" . (int)$data['image_additional_height'] . "', image_related_width = '" . (int)$data['image_related_width'] . "', image_related_height = '" . (int)$data['image_related_height'] . "', image_cart_width = '" . (int)$data['image_cart_width'] . "', image_cart_height = '" . (int)$data['image_cart_height'] . "' WHERE store_id = '" . (int)$store_id . "'");
Code: Select all
$_['entry_url'] = 'Store URL:<br /><span class="help">Include the full URL to your store. Make sure to add \'/\' at the end. Example: http://wwww.yourdomain.com/path/</span>';
Code: Select all
$_['entry_url'] = 'Store URL:<br /><span class="help">Include the URL to your store. Do NOT include \'www.\' and make sure to add \'/\' at the end. Example: http://yourdomain.com/path/</span>';
trying to change some HTTPs to HTTP doesn't fix. I might doing something wrong. I also can't get to login tab and other, but still can view the products. Yet, the pictures are missing.Constant HTTP_SERVER already defined in /var/www/vhosts/bkksprolab.com/subdomains/shop/httpdocs/opencart/index.php on line 100Notice: Use of undefined constant HTTPS_SERVER - assumed 'HTTPS_SERVER' in /var/www/vhosts/bkksprolab.com/subdomains/shop/httpdocs/opencart/index.php on line 101Notice: Use of undefined constant HTTPS_SERVER - assumed 'HTTPS_SERVER' in /var/www/vhosts/bkksprolab.com/subdomains/shop/httpdocs/opencart/catalog/controller/common/header.php on line 82Notice: Use of undefined constant HTTPS_SERVER - assumed 'HTTPS_SERVER' in /var/www/vhosts/bkksprolab.com/subdomains/shop/httpdocs/opencart/catalog/controller/common/header.php on line 84Notice: Use of undefined constant HTTPS_SERVER - assumed 'HTTPS_SERVER' in /var/www/vhosts/bkksprolab.com/subdomains/shop/httpdocs/opencart/catalog/controller/common/header.php on line 87
Yes, I did post a "fix" for this but NOT in the way dev3fx describes in his post!!!I got it working following the instructions of the user Blueforce:
in index.php on line 93 , 97 , 100
Code: Select all
define('HTTP_SERVER', 'http://' . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/') . '/');
replace with:
Code: Select all
define('HTTP_SERVER', 'http://' . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/.\\') . '/');
Do not know where the bug is?emax4ever wrote:how to fix this bug?
Showing %s to %s of %s (%s Pages) in the product page..
by the way many thanks Daniel for your hard work.
Code: Select all
'Showing {start} to {end} of {total} ({pages} Pages)';
Thank you Leffe,Blueforce wrote:Hi coffeecircus,
dev3fx wrote:Yes, I did post a "fix" for this but NOT in the way dev3fx describes in his post!!!I got it working following the instructions of the user Blueforce:
in index.php on line 93 , 97 , 100
Code: Select all
define('HTTP_SERVER', 'http://' . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/') . '/');
replace with:
Code: Select all
define('HTTP_SERVER', 'http://' . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/.\\') . '/');
The ONLY thing you need to change in lines 93, 97, 100 are the part I marked in red colour:
rtrim(dirname($_SERVER['PHP_SELF']), '/')
to
rtrim(dirname($_SERVER['PHP_SELF']), '/.\\')
You should NOT paste the same line in all three places as described by dev3fx.
Just replace the part I marked red and you should be fine.
Best regards,
Leffe
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'])) . "%'";
}
Is this releated to OC 1.4.2?YellowSnow wrote:Hey All,
I have seen many posts on this in the Forum already but it seems I just can't get it to work. I am having an issue where I create a new Coupon, then I fill out all of the required data here are my settings
THANK YOU!
P.S. The products I'm testing all have an inventory of 1000 or greater and all product options have an inventory of 1000 or greater...and setting "Subtract Inventory" is set to "NO"
Code: Select all
$this->model_tool_seo_url->rewrite(HTTP_SERVER ......
Code: Select all
$this->model_tool_seo_url->rewrite(HTTPS_SERVER .....
which is indeed a 'great result'.unescaped & or unknown entity "&..."
Code: Select all
$this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/manufacturer&manufacturer_id=' . $result['manufacturer_id'])
Code: Select all
$this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/category&path=' . $new_path)
Code: Select all
public function rewrite($link) {
if ($this->config->get('config_seo_url')) {
$url_data = parse_url(str_replace('&', '&', $link));
Now it is 'much' betterDaniel wrote:Basicly the url class was pretty stuiped. it should not have existed at all. whch frameworks have a url class like the one I used? I might as well just have used 2 functions.
Code: Select all
} else {
return $link;
}
Code: Select all
} else {
$link = str_replace( '&', '&', $link );
return $link;
}
Code: Select all
} else {
$link = str_replace( '&', '&', $link ); // replace forgotten & with &
$link = str_replace( '&', '&', $link ); // and replace all & with &
return $link;
}