Post by jipsa78 » Fri Dec 07, 2012 9:53 pm

Hi,

Thanx for this solution and vqmod file!
Works great in OpenCart 1.5.3.1, except for the customer name in the email confirmation. OpenCart error log says:

2012-12-07 11:58:44 - PHP Notice: Undefined property: Customer::$getFirstName in /home/*/public_html/vqmod/vqcache/vq2-catalog_controller_account_return.php on line 340
2012-12-07 11:58:44 - PHP Notice: Undefined property: Customer::$getLastName in /home/*/public_html/vqmod/vqcache/vq2-catalog_controller_account_return.php on line 340

Any idea how to fix this?
I've already tried removing the calls for first and lastname in the vqmod file, but that just broke the whole returns section.

Newbie

Posts

Joined
Sun Aug 12, 2012 6:21 pm

Post by straightlight » Sat Dec 08, 2012 1:23 am

@Gorilla:

please post between the line 335 and line 345 from your file: /vqmod/vqcache/vq2-catalog_controller_account_return.php

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by octanepc » Thu Dec 13, 2012 12:48 am

those calls need to say $this->customer->getFirstName() and $this->customer->getLastName()

Newbie

Posts

Joined
Thu Dec 13, 2012 12:48 am

Post by lowlands » Thu Jan 03, 2013 1:52 am

What is the latest verdict on the correctness of this XML file. Has it been updated? I would love to implement this but I need to know if it functions correctly.

BTW Happy New Year!

My OC-shop: http://www.BootBouwShop.nl - http://www.Soldeerpunt.nl


User avatar
Active Member

Posts

Joined
Sun Dec 20, 2009 8:49 am

Post by PlugGuy » Fri Apr 05, 2013 4:50 am

Wonder if there is a setting, trigger or code in 1.5.5 that will auto reply when returns are done on opencart.

Kind of hidden deep in there unless you go look for it, and we get very few, so it's not something we check often.

Anyone solve this with a quick code update, vqmod or other?

Thanks.

Chief Plug Guy
BumperPlugs.com


User avatar
Active Member

Posts

Joined
Fri Jan 25, 2013 11:11 pm


Post by DSTAngieB » Tue Aug 26, 2014 2:52 am

I'm still looking for a fix for this problem as well. I'm running OC 1.5.6.4 at present.

Just a simple e-mail that notifies me that someone has requested a return (or even a COPY of any e-mail sent to the customer confirming their return) would do nicely.

Anyone??? Anyone?? :-)

New member

Posts

Joined
Mon Oct 28, 2013 10:07 pm

Post by CALIN82 » Fri Aug 29, 2014 6:51 pm

Hi DSTAngieB,
In catalog/module/account/return.php
On line 5 before:

Code: Select all

}
public function getReturn($return_id) {
Add:

Code: Select all

$mail = new Mail();
			$mail->protocol = $this->config->get('config_mail_protocol');
			$mail->parameter = $this->config->get('config_mail_parameter');
			$mail->hostname = $this->config->get('config_smtp_host');
			$mail->username = $this->config->get('config_smtp_username');
			$mail->password = $this->config->get('config_smtp_password');
			$mail->port = $this->config->get('config_smtp_port');
			$mail->timeout = $this->config->get('config_smtp_timeout');
			$mail->setTo('YOUREMAIL@EMAIL.COM');
			$mail->setFrom($this->config->get('config_email'));
			$mail->setSender('YOUR WEBSITE NAME');
			$mail->setSubject(html_entity_decode('YOUR SUBJECT', ENT_QUOTES, 'UTF-8'));
			$mail->setText(html_entity_decode('YOUR MESAGE',     ENT_QUOTES, 'UTF-8'));
			$mail->send();
Complete with your settings inside code.
Good luck!

Newbie

Posts

Joined
Thu Sep 13, 2012 9:18 pm

Post by jewellerstore » Fri Aug 29, 2014 10:12 pm

straightlight wrote:
apendragon wrote:True. But whatever other file I lifted the bulk of that code from, I don't think the variable store name was working. I invite anyone to help me make this better. What I have here is purely utilitarian.
Try the XML version.
This worked for me. Just sends an email to your admin email address saying a returns request has been submitted. You can then check. Saves checking all the time on the off chance, or even worse missing one! Like I did last week.

Attachments


New member

Posts

Joined
Fri Dec 30, 2011 6:28 pm

Post by slingeraap » Wed Mar 25, 2015 11:05 pm

apendragon wrote:Let me preface this by saying I'm not much of a programmer. What I've done here is not elegant, but it does work. Tried and true on 1.5.2.1.

EDIT: catalog/controller/account/return.php

FIND:

Code: Select all

return true;
BEFORE, within the IF statement, ADD:

Code: Select all

$mail = new Mail();
$mail->protocol = $this->config->get('config_mail_protocol');
$mail->parameter = $this->config->get('config_mail_parameter');
$mail->hostname = $this->config->get('config_smtp_host');
$mail->username = $this->config->get('config_smtp_username');
$mail->password = $this->config->get('config_smtp_password');
$mail->port = $this->config->get('config_smtp_port');
$mail->timeout = $this->config->get('config_smtp_timeout');				
$mail->setTo($this->config->get('config_email'));
$mail->setFrom($this->config->get('config_email'));
$mail->setSender('STORE NAME');
$mail->setSubject(html_entity_decode('STORE NAME Return Request', ENT_QUOTES, 'UTF-8'));
$mail->setText(strip_tags(html_entity_decode('This is a notification: a customer has requested to return a product from an order. Please log in to the Store Admin. The details are under Sales --> Returns.', ENT_QUOTES, 'UTF-8')));
$mail->send();
A real programmer could probably make that more fancy, complete with actual information about the return. That seems to be the right spot for the code, though. It sends upon a successful return submission.

Jason
Thank you, this also works on OC v 1.5.5.1.

New member

Posts

Joined
Sun Dec 05, 2010 7:02 pm

Post by gbumoon » Wed Mar 30, 2016 2:24 am

I know this is a long shot, but I installed this on v2.0.3.1, fingers crossed.

New member

Posts

Joined
Sat Oct 30, 2010 2:28 am

Post by jcusters » Sat Aug 27, 2016 2:50 pm

Hi,

Thanks apendragon and Straightlight! This code still works for oc 2.x (with some small changes). I have created a vqmod extension: http://www.opencart.com/index.php?route ... n_id=27732

Regards,
Jeroen

Newbie

Posts

Joined
Tue Jun 11, 2013 3:41 am
Who is online

Users browsing this forum: No registered users and 24 guests