HomeBreadcrumb ArrowModulesBreadcrumb ArrowOpenCartBreadcrumb ArrowPreOrderBreadcrumb ArrowSome issues
Thread Solved

Some issues

This discussion has been marked as solved
User Image
Willian Melo Machado member
#1 posted on 7/7/15

Hi i've installed the pre order module in an opencart 2031, but I can't get the button Add To Cart to change the text and also I'm getting a success blank checkout page when pre ordering an item. The checkout message is ok when I buy a product in stock.

 

The erros log is empty.

0
User Image
Willian Melo Machado member
#2 posted on 7/7/15 (edited on 7/7/15)

Ok I've got it done... first of all. I was getting an error : "Variable $Products is not defined" in preorder.php. It is because this variable is outside of its scope, so I had to move it's declaration to before the line

 

if (!empty($preordered_products)) {

...

}

 

Second, I'm using SMTP to send e-mails, and comparing the native mail function in order.php with the pre-order module mail code, it uses other mail protocol configuration instead of native smtp options, so I had to change those lines:

 

                $mailToUser->hostname     = $this->config->get('config_smtp_host');

                $mailToUser->username     = $this->config->get('config_smtp_username');               

                $mailToUser->password     = $this->config->get('config_smtp_password');         

                $mailToUser->port         = $this->config->get('config_smtp_port');                 

                $mailToUser->timeout     = $this->config->get('config_smtp_timeout');

 

To this:

 

                $mailToUser->smtp_hostname     = $this->config->get('config_mail_smtp_hostname');

                $mailToUser->smtp_username     = $this->config->get('config_mail_smtp_username');

                $mailToUser->smtp_password     = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8');

                $mailToUser->smtp_port         = $this->config->get('config_mail_smtp_port');

                $mailToUser->smtp_timeout     = $this->config->get('config_mail_smtp_timeout');

 

I also had to create the column 'customer_notified' in oc_preorder table in order to execute a bulk delete operation in pre-order admin interface

Anyway, if someon have this kind of issue, this is the way I got it fixed.

0