1.5.4.1 Bize Sorun Tab Sekmesi |
|||
Konuyu görüntüleyenler: 2 Misafir
|
|||
|
|||
|
|||
|
|||
yusuf_07
Üye Mesajlar: 152 Konular: 35 Katılma Tarihi: Jun 2012 Rep Puanı: 3 Teşekkürler: 257
62 Mesajına, 123 Teşekkür edildi. Kişisel Bilgileri:
Konu Tarihi: 11-28-2012 09:57 AM
Merhaba Arkadaşlar.İstek Olduğunu Gördüm ve 1.5.4.1 İçinde Düzenledim.Güle Güle Kullanın. Aç : catalog/controller/product/product.php Bul: $product_info = $this->model_catalog_product->getProduct($product_id); Üstüne Ekle: $this->data['product_info'] = $product_info; Aç : catalog/language/turkish/product/product.php Bul : $_['text_error'] = 'Ürün Bulunamadı!'; Altına Ekle : $_['text_intro'] = 'Hakkındaki Sorunuzu Yazınız : '; $_['text_intro2'] = 'Bize Sorun'; $_['text_message'] = '<p>Sorunuz Başarıyla Mağaza Sahibine Gönderildi!</p>'; $_['text_subject'] = 'Bu Ürün Hakkındaki Soru : '; $_['heading_title'] = 'Bize Sorun'; $_['entry_email'] = 'E-Mail Adresiniz :'; $_['entry_enquiry'] = 'İçin Sorunuz :'; $_['email_subject'] = '%s İtibaren %s Ürünü Hakkındaki Sorunuz'; $_['tab_extra'] = 'Bize Sorun'; $_['error_email'] = 'E-Posta Adresiniz Geçerli Görünmüyor!'; $_['error_enquiry'] = 'Sorunuz 10 ila 3000 Karakter Arasında Olmalıdır!'; Aç : catalog/controller/product/product.php Bul : $this->data['tags'] = array(); Üstüne Ekle : if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { $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->request->post['email']); $mail->setSender($this->request->post['name']); $mail->setSubject(html_entity_decode(sprintf($this->language->get('email_subject'), $this->request->post['product'], $this->request->post['name']), ENT_QUOTES, 'UTF-8')); $mail->setText(strip_tags(html_entity_decode(sprintf($this->request->post['enquiry'], $this->request->post['product'], $this->request->post['name']), ENT_QUOTES, 'UTF-8'))); //This is the message for the owner $product_name = $this->request->post['product']; $product_link = $this->url->link('product/product', 'product_id=' . $product_id); //Set size of thumb in email changing the last 2 values $image_product = $this->model_tool_image->resize($result['image'], 100, 100); $message = $this->language->get('text_subject').'<strong><a href="'.$product_link.'">'.$product_name.'</a></strong>: <br /><img src="'.$image_product.'" /><p>'.strip_tags(html_entity_decode($this->request->post['enquiry'], ENT_QUOTES, 'UTF-8')).'</p>'; $mail->setHtml($message); $mail->send(); $this->redirect($this->url->link('product/product/success')); } $this->data['text_intro'] = $this->language->get('text_intro'); $this->data['text_intro2'] = $this->language->get('text_intro2'); $this->data['text_location'] = $this->language->get('text_location'); $this->data['text_contact'] = $this->language->get('text_contact'); $this->data['text_address'] = $this->language->get('text_address'); $this->data['text_telephone'] = $this->language->get('text_telephone'); $this->data['text_fax'] = $this->language->get('text_fax'); $this->data['tab_extra'] = $this->language->get('tab_extra'); $this->data['entry_name'] = $this->language->get('entry_name'); $this->data['entry_email'] = $this->language->get('entry_email'); $this->data['entry_enquiry'] = $this->language->get('entry_enquiry'); $this->data['entry_captcha'] = $this->language->get('entry_captcha'); if (isset($this->error['name'])) { $this->data['error_name'] = $this->error['name']; } else { $this->data['error_name'] = ''; } if (isset($this->error['email'])) { $this->data['error_email'] = $this->error['email']; } else { $this->data['error_email'] = ''; } if (isset($this->error['enquiry'])) { $this->data['error_enquiry'] = $this->error['enquiry']; } else { $this->data['error_enquiry'] = ''; } if (isset($this->error['captcha'])) { $this->data['error_captcha'] = $this->error['captcha']; } else { $this->data['error_captcha'] = ''; } $this->data['button_continue'] = $this->language->get('button_continue'); $this->data['action'] = $this->url->link('product/product', 'product_id=' . $product_id); $this->data['store'] = $this->config->get('config_name'); $this->data['address'] = nl2br($this->config->get('config_address')); $this->data['telephone'] = $this->config->get('config_telephone'); $this->data['fax'] = $this->config->get('config_fax'); $this->data['contacts'] = $this->config->get('config_contacts'); if (isset($this->request->post['name'])) { $this->data['name'] = $this->request->post['name']; } else { $this->data['name'] = $this->customer->getFirstName(); } if (isset($this->request->post['email'])) { $this->data['email'] = $this->request->post['email']; } else { $this->data['email'] = $this->customer->getEmail(); } if (isset($this->request->post['enquiry'])) { $this->data['enquiry'] = $this->request->post['enquiry']; } else { $this->data['enquiry'] = ''; } if (isset($this->request->post['captcha'])) { $this->data['captcha'] = $this->request->post['captcha']; } else { $this->data['captcha'] = ''; } if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/information/contact.tpl')) { $this->template = $this->config->get('config_template') . '/template/information/contact.tpl'; } else { $this->template = 'default/template/information/contact.tpl'; } $this->children = array( 'common/column_left', 'common/column_right', 'common/content_top', 'common/content_bottom', 'common/footer', 'common/header' ); $this->response->setOutput($this->render()); Bul : public function review() { Üstüne Ekle : public function success() { $this->language->load('product/product'); $this->document->setTitle(sprintf($this->language->get('heading_title'))); $this->data['breadcrumbs'] = array(); $this->data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/home'), 'separator' => false ); /* $this->data['breadcrumbs'][] = array( 'text' => sprintf($this->language->get('heading_title')), 'href' => $this->url->link('product/product', 'product_id=' . $product_id), 'separator' => $this->language->get('text_separator') ); */ $this->data['heading_title'] = sprintf($this->language->get('heading_title')); $this->data['text_message'] = $this->language->get('text_message'); $this->data['button_continue'] = $this->language->get('button_continue'); $this->data['continue'] = $this->url->link('common/home'); if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/success.tpl')) { $this->template = $this->config->get('config_template') . '/template/common/success.tpl'; } else { $this->template = 'turkish-gray_v3/template/common/success.tpl'; } $this->children = array( 'common/column_left', 'common/column_right', 'common/content_top', 'common/content_bottom', 'common/footer', 'common/header' ); $this->response->setOutput($this->render()); } private function validate() { if ((utf8_strlen($this->request->post['name']) < 3) || (utf8_strlen($this->request->post['name']) > 32)) { $this->error['name'] = $this->language->get('error_name'); } if (!preg_match('/^[^\@]+@.*\.[a-z]{2,6}$/i', $this->request->post['email'])) { $this->error['email'] = $this->language->get('error_email'); } if ((utf8_strlen($this->request->post['enquiry']) < 10) || (utf8_strlen($this->request->post['enquiry']) > 3000)) { $this->error['enquiry'] = $this->language->get('error_enquiry'); } if (empty($this->session->data['captcha']) || ($this->session->data['captcha'] != $this->request->post['captcha'])) { $this->error['captcha'] = $this->language->get('error_captcha'); } if (!$this->error) { return true; } else { return false; } } Aç : catalog/view/theme/default/template/product/product.tpl Bul: <a href="#tab-related"><?php echo $tab_related; ?> (<?php echo count($products); ?>) 1 Satır Atlayarak Sonrasına Ekle <?php $link_product=$this->url->link('product/product', 'product_id=' . $product_id); ?> <a href="#tab-extra"><?php echo $tab_extra; ?></a> Bul : <?php if ($tags) { ?> Üstüne Ekle : <div id="tab-extra" class="tab-extra"><h3 style="padding-top:5px;text-align:left;padding-left:10px"><?php echo $text_intro2; ?></h3> <table class="attribute"> <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="contact"> <div style="padding-left:10px" class="contact-info"><p><a href="<?php echo $link_product; ?>"><?php echo $product['name']; ?> </a><?php echo $text_intro; ?></p></div> <div class="content"> <input type="hidden" name="product" value="<?php echo $product['name']; ?>" /> <b><?php echo $entry_name; ?></b><br /> <input type="text" name="name" value="<?php echo $name; ?>" /> <br /> <?php if ($error_name) { ?> <span class="error"><?php echo $error_name; ?></span> <?php } ?> <br /> <b><?php echo $entry_email; ?></b><br /> <input type="text" name="email" value="<?php echo $email; ?>" /> <br /> <?php if ($error_email) { ?> <span class="error"><?php echo $error_email; ?></span> <?php } ?> <br /> <b><a href="<?php echo $link_product; ?>"><?php echo $product['name']; ?></a> <?php echo $entry_enquiry; ?></b><br /> <textarea name="enquiry" cols="40" rows="10" style="width: 99%;"><?php echo $enquiry; ?></textarea> <br /> <?php if ($error_enquiry) { ?> <span class="error"><?php echo $error_enquiry; ?></span> <?php } ?> <br /> <b><?php echo $entry_captcha; ?></b><br /> <input type="text" name="captcha" value="<?php echo $captcha; ?>" /> <br /> <img src="index.php?route=information/contact/captcha" alt="" /> <?php if ($error_captcha) { ?> <span class="error"><?php echo $error_captcha; ?></span> <?php } ?> </div> <div class="buttons"> <div class="right"><input type="submit" value="<?php echo $button_continue; ?>" class="buttonh" /></div> </div> </form> </table> </div> |
|
sogenserkan
Üye Mesajlar: 88 Konular: 16 Katılma Tarihi: Dec 2011 Rep Puanı: 0 Teşekkürler: 47
6 Mesajına, 9 Teşekkür edildi. Kişisel Bilgileri: |
|
|
|
|
Direk Link | |
HTML Link | |
BBCode Link | |
Sosyal Paylaş |