opencart2.x

Specific template for category and product page in OpenCart 2.2.0.0

天大地大妈咪最大 提交于 2019-12-02 11:03:10
I am using OpenCart version 2.2.0.0 and trying to set different template for each category and product page. Searching online I found following code: if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/category_' . $category_id . '.tpl')) { $this->template = $this->config->get('config_template') . '/template/product/category_' . $category_id . '.tpl'; } elseif (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/category.tpl')) { $this->template = $this->config->get('config_template') . '/template/product/category.tpl'; }

Opencart: modifying email layouts

心不动则不痛 提交于 2019-12-02 07:46:35
问题 I'm running Opencart Version 2.0.1.1. I need a way of editing the layout of the registration and order update email. By this, I mean control the full layout using HTML/CSS, not just edit the text definitions of the variables. I am aware these are located in: ./catalog/language/english/mail/customer.php and ../order.php respectively. My theme came with a custom mail for the order email template located in ./catalog/view/theme/theme574/template/mail/order.tpl (see below). I want that level of

Opencart: modifying email layouts

让人想犯罪 __ 提交于 2019-12-02 07:05:51
I'm running Opencart Version 2.0.1.1. I need a way of editing the layout of the registration and order update email. By this, I mean control the full layout using HTML/CSS, not just edit the text definitions of the variables. I am aware these are located in: ./catalog/language/english/mail/customer.php and ../order.php respectively. My theme came with a custom mail for the order email template located in ./catalog/view/theme/theme574/template/mail/order.tpl (see below). I want that level of control for when the user registers and when I update the order status with a comment. <!DOCTYPE html

Add 'plus' 'minus' in place of 'add to cart' in opencart

孤者浪人 提交于 2019-12-01 12:56:14
I want to replace add to cart with 2 buttons that are plus and minus in OpenCart 2.0.1.1, Now i am unable to code for minus button properly. I have added plus and mius button in catalog/view/theme/*/template/module/featured.tpl and make call in catalog/controller/api/cart.php and in common.js I have put url like url: 'index.php?route=checkout/cart/minus and rest of code is below system/library/cart.php public function minus($product_id, $qty) { $this->data = array(); $qnt1 = 1; $product['product_id'] = (int)$product_id; $key = base64_encode(serialize($product)); if ((int)$qty && ((int)$qty > 0

Send Attachment in PHP with OpenCart 2.1.1.1

不想你离开。 提交于 2019-11-30 22:18:28
Does anyone with knowledge of OpenCart 2.0.1.1 know how I could implement the following addAttachment function found in system/libary/mail.php: public function addAttachment($filename) { $this->attachments[] = $filename; } into catalog/controller/information/contact.php - so that the default contact form can also include an attachment upload feature? I tried this but no dice. if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { unset($this->session->data['captcha']); $mail = new Mail($this->config->get('config_mail')); $mail->setTo($this->config->get('config_email')

Proper way to work using the real image of a product on OpenCart 2

纵然是瞬间 提交于 2019-11-28 14:35:07
I'm currently looking for the proper way to work on a theme using the real image of a product and not its thumbnail (identified as $thumb in the default theme). I have found a abrupt trick by adding a line in the controller file: $this->data['cover'] = $product_info['image']; But does anybody have experienced a better method (eg with vqmod ) to retrieve these real image data without changing controller content (for using in template pages, such as product.tpl or category.tpl for example)? With help from members of OpenCart forum , I managed to find a functional solution (using vQmod ). It is

Adding an admin page on OpenCart version 2

一曲冷凌霜 提交于 2019-11-27 20:56:04
I am havin a problem adding an admin page to Opencart2, and following the answers on pretty much identical questions on SO do no help, so I beleive the problem is specific to OC2. Following the answer at this question I still get the error message " Fatal error: Call to undefined method ControllerCustomHelloWorld::render() in C:\websites\weddingshoponline\shop\admin\controller\custom\helloworld.php on line 13 . Any help would be much appreciated, as I have been going around in circles. Thank you. PS Reverting to a previous version of OC is not valid response, albeit a good one. The difference

Proper way to work using the real image of a product on OpenCart 2

不想你离开。 提交于 2019-11-27 08:53:42
问题 I'm currently looking for the proper way to work on a theme using the real image of a product and not its thumbnail (identified as $thumb in the default theme). I have found a abrupt trick by adding a line in the controller file: $this->data['cover'] = $product_info['image']; But does anybody have experienced a better method (eg with vqmod ) to retrieve these real image data without changing controller content (for using in template pages, such as product.tpl or category.tpl for example)? 回答1

Adding an admin page on OpenCart version 2

落爺英雄遲暮 提交于 2019-11-26 20:29:51
问题 I am havin a problem adding an admin page to Opencart2, and following the answers on pretty much identical questions on SO do no help, so I beleive the problem is specific to OC2. Following the answer at this question I still get the error message " Fatal error: Call to undefined method ControllerCustomHelloWorld::render() in C:\websites\weddingshoponline\shop\admin\controller\custom\helloworld.php on line 13 . Any help would be much appreciated, as I have been going around in circles. Thank