Post by doghi22 » Mon Jan 17, 2022 6:35 pm

Hello there,

I want to remove email obligativity for quests from checkout. Im using opencart 3.0.3.2 with Journal Theme 3.

I tried https://stackoverflow.com/questions/631 ... t-checkout, but is not working. The error message is still there, also this code removes completly email, i just want to make it optional.
Last edited by doghi22 on Wed Jan 19, 2022 12:21 am, edited 1 time in total.

Newbie

Posts

Joined
Mon Nov 09, 2020 11:07 pm

Post by paulfeakins » Mon Jan 17, 2022 8:23 pm

Contact Journal support: https://support.journal-theme.com

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by doghi22 » Mon Jan 17, 2022 9:08 pm

paulfeakins wrote:
Mon Jan 17, 2022 8:23 pm
Contact Journal support: https://support.journal-theme.com
They don't provide assistance for this matter.

Newbie

Posts

Joined
Mon Nov 09, 2020 11:07 pm

Post by khnaz35 » Mon Jan 17, 2022 9:23 pm

Have you refresh your modifications and clear the theme cache after changes in code?

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by doghi22 » Mon Jan 17, 2022 9:31 pm

khnaz35 wrote:
Mon Jan 17, 2022 9:23 pm
Have you refresh your modifications and clear the theme cache after changes in code?
Yeap, that message is still there.

(error message i meant)

Newbie

Posts

Joined
Mon Nov 09, 2020 11:07 pm

Post by khnaz35 » Mon Jan 17, 2022 9:33 pm

doghi22 wrote:
Mon Jan 17, 2022 9:31 pm
khnaz35 wrote:
Mon Jan 17, 2022 9:23 pm
Have you refresh your modifications and clear the theme cache after changes in code?
Yeap, that message is still there.

(error message i meant)
Then most likely you have made changes to different files.

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by doghi22 » Mon Jan 17, 2022 10:11 pm

khnaz35 wrote:
Mon Jan 17, 2022 9:33 pm
doghi22 wrote:
Mon Jan 17, 2022 9:31 pm
khnaz35 wrote:
Mon Jan 17, 2022 9:23 pm
Have you refresh your modifications and clear the theme cache after changes in code?
Yeap, that message is still there.

(error message i meant)
Then most likely you have made changes to different files.
No, the modifications from that link aplies, no email is displayed in checkout as guest, also no error displayed anymore. But in console i have an js error from checkout.js about email is required, even with those changes.

Newbie

Posts

Joined
Mon Nov 09, 2020 11:07 pm

Post by doghi22 » Mon Jan 17, 2022 10:25 pm

After some changes i manage to cancel the errors from checkout.js
Now i can send the order without email warning, but i got error cause website cant sent email, becose is empty.

File: system/library/mail.php Change:
$this->to = $to;
To:
if ($to != '') {$this->to = $to;} else { $this->to = 'myemail@email.com';}


This code not working, i need to send it to a default adress if its empty..

Newbie

Posts

Joined
Mon Nov 09, 2020 11:07 pm

Post by doghi22 » Tue Jan 18, 2022 5:45 am

I did manage to solve this

Newbie

Posts

Joined
Mon Nov 09, 2020 11:07 pm

Post by Majnoon » Tue Jan 18, 2022 10:34 am

doghi22 wrote:
Tue Jan 18, 2022 5:45 am
I did manage to solve this
Thanks for the update will suggest you post your solution here too if someone is struggling with same don't have to go through the same.

New member

Posts

Joined
Fri Feb 05, 2021 8:29 pm

Post by doghi22 » Tue Jan 18, 2022 5:49 pm

Majnoon wrote:
Tue Jan 18, 2022 10:34 am
doghi22 wrote:
Tue Jan 18, 2022 5:45 am
I did manage to solve this
Thanks for the update will suggest you post your solution here too if someone is struggling with same don't have to go through the same.
Ofcorse, you are right.

I did follow this : https://stackoverflow.com/questions/631 ... t-checkout

Code: Select all

I did not do this step :  if ($to != '') {$this->to = $to;} else { $this->to = 'web-and-seo@itech.bg';}
cause not working,
Instead i made changes in :

/ocartdata/storage/modification/catalog/controller/mail/order.php

Code: Select all

I added this condition: 

if (empty($order_info['email'])) {
    $finalemail= "info@mywebsite.com";}
    else {
     $finalemail= $order_info['email'];
    }

Code: Select all

and changed : 

$mail->setTo($order_info['email']);

to 
$mail->setTo($finalemail);

Newbie

Posts

Joined
Mon Nov 09, 2020 11:07 pm

Post by khnaz35 » Tue Jan 18, 2022 11:40 pm

Glad your issue is resolved now. Kindly add word [SOLVED] at the beginning of the post title.

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by Cue4cheap » Wed Jan 19, 2022 9:11 am

doghi22 wrote:
Tue Jan 18, 2022 5:49 pm

Instead i made changes in :

/ocartdata/storage/modification/catalog/controller/mail/order.php
This will get overwritten when you refresh modifications.
Mike

cue4cheap not cheap quality


Active Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by doghi22 » Wed Jan 19, 2022 6:13 pm

Cue4cheap wrote:
Wed Jan 19, 2022 9:11 am
doghi22 wrote:
Tue Jan 18, 2022 5:49 pm

Instead i made changes in :

/ocartdata/storage/modification/catalog/controller/mail/order.php
This will get overwritten when you refresh modifications.
Mike
Not really, i did deleted and refreshed modifications a few times. My code is still there, maybe this file no regenerating ?

Newbie

Posts

Joined
Mon Nov 09, 2020 11:07 pm

Post by doghi22 » Wed Jan 19, 2022 11:17 pm

Cue4cheap wrote:
Wed Jan 19, 2022 9:11 am
doghi22 wrote:
Tue Jan 18, 2022 5:49 pm

Instead i made changes in :

/ocartdata/storage/modification/catalog/controller/mail/order.php
This will get overwritten when you refresh modifications.
Mike
I think you are right in the end.
so change this
public_html/catalog/controller/mail/order.php

Newbie

Posts

Joined
Mon Nov 09, 2020 11:07 pm
Who is online

Users browsing this forum: No registered users and 7 guests