Codeigniter-Barcode icon indicating copy to clipboard operation
Codeigniter-Barcode copied to clipboard

Zend Library

Open crg821 opened this issue 9 years ago • 4 comments

Want to send barcodes to a list of emails but when passing $this->set_barcode($temp) to the view, the view won't load the barcode. I wonder if Zend_Barcode or the Zend library is not orking is not working with CI 2.x.
MY CONTROLLER public function SendEmail($results){ foreach ($results->result() as $row) { $this->email->clear(TRUE); $temp = rand(10000, 99999); $email = $row->email_test; $fname = $row->fname_test; $bar_code = $this->set_barcode($temp); $email_data = []; $email_data = array('fname'=> $fname, 'email'=> $email, 'bar_code'=> $bar_code); $message = $this->load->view('pages/email_format', $email_data, TRUE); $this->email->to($email_data['email']); $this->email->from("[email protected]", "Some Person"); $this->email->subject("My Subject"); $this->email->message($message); $send = $this->email->send(); } } MY VIEW <?php echo $bar_code ?>

crg821 avatar Aug 30 '16 05:08 crg821

I think the problem is, your barcode should be attached on mail. Try this '$this->email->print_debugger()' to debug your code.

desta88 avatar Aug 31 '16 10:08 desta88

I am trying to pass the image from $this->set_barcode($temp) into the view Iload. So $message will contain other data and the image the function set_barcode() generates like so: $barcode = $this->set_barcode($temp); $email_data = array('fname' =>$fname, 'barcode'=>$barcode); $message = $this->load->view('path_to_view', $email_data, TRUE);

On Wed, Aug 31, 2016 at 5:11 AM, Andhika Desta Permana < [email protected]> wrote:

I think the problem is, your barcode should be attached on mail. Try this '$this->email->print_debugger()' to debug your code.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/desta88/Codeigniter-Barcode-Generator-Zend-Library/issues/3#issuecomment-243720091, or mute the thread https://github.com/notifications/unsubscribe-auth/AEHp6c5uboM7VHA2Q__94iN2vlWJqd92ks5qlVNOgaJpZM4JwKYr .

crg821 avatar Sep 01 '16 23:09 crg821

public function SendEmail($results){foreach ($results->result() as $row){$this->email->clear(TRUE);$temp = rand(10000, 99999);$email = $row->email_test;$fname = $row->fname_test;$bar_code = $this->set_barcode($temp);$email_data = [];$email_data = array('fname'=> $fname, 'email'=> $email, 'bar_code'=> $bar_code);$message = $this->load->view('pages/email_format', $email_data, TRUE);$this->email->to($email_data['email']);$this->email->from("[email protected]", "Some Person");$this->email->subject("My Subject");$this->email->message($message);$send = $this->email->send();}}MY VIEW

bambanguzumaki11 avatar Oct 07 '16 01:10 bambanguzumaki11

@bambanguzumaki11 beutify your code please ..

destaFog avatar Jan 22 '19 20:01 destaFog