Post by Suwanto » Tue Jun 28, 2016 12:33 pm

mohon dibantu.
saya mau menambahkan field bonus pada page product.
Image
tp setelah saya ketik bonusnya. value bonusnya tidak bisa masuk ke database.
kemarin2 pake vqmod bisa. tp skrg gk bisa lagi. tolong bantu cek salah dimana.

$this->db->query("UPDATE " . DB_PREFIX . "product_description SET bonus_details = '" . $this->db->escape($value['bonus_details']) . "' WHERE product_id = '" . (int)$product_id . "' AND language_id = '" . (int)$language_id . "'");

PHP Notice: Undefined index: bonus_details

udah saya create bonus_details nya di product_description. tp tetap error.

mohon bantuannya ya.

Thanks,
Suwanto

Newbie

Posts

Joined
Thu Mar 08, 2012 2:43 pm

Post by Suwanto » Tue Jun 28, 2016 12:58 pm

<!-- Admin Start -->

<file name="admin/language/*/catalog/product.php" error="log">
<operation error="log">
<search position="after"><![CDATA[$_['entry_name']]]></search>
<add><![CDATA[$_['entry_bonus'] = 'Bonus:';
$_['entry_bonus_help'] = 'Show on Product Page must be set to enabled if you want the product bonus to be shown';]]></add>
</operation>
</file>

<file name="admin/controller/catalog/product.php" error="log">
<operation error="log">
<search position="after"><![CDATA[$this->language->get('entry_name');]]></search>
<add><![CDATA[$data['entry_bonus'] = $this->language->get('entry_bonus');
$data['entry_bonus_help'] = $this->language->get('entry_bonus_help');]]></add>
</operation>
</file>

<file name="admin/model/catalog/product.php" error="log">
<operation error="log">
<search position="after"><![CDATA[$this->db->query("INSERT INTO " . DB_PREFIX . "product_description]]></search>
<add><![CDATA[$this->db->query("UPDATE " . DB_PREFIX . "product_description SET bonus_details = '" . $this->db->escape($value['bonus_details']) . "' WHERE product_id = '" . (int)$product_id . "' AND language_id = '" . (int)$language_id . "'");]]></add>
</operation>
<operation error="log">
<search position="after"><![CDATA[$result['name'],]]></search>
<add><![CDATA['bonus_details' => $result['bonus_details'],]]></add>
</operation>
</file>

<file name="admin/view/template/catalog/product_form.tpl" error="log">
<operation error="log">
<search position="before" index="1"><![CDATA[<div class="form-group">]]></search>
<add><![CDATA[<div class="form-group">
<label class="col-sm-2 control-label" for="input-bonus<?php echo $language['language_id']; ?>"><span data-toggle="tooltip" title="<?php echo $entry_bonus_help; ?>"><?php echo $entry_bonus; ?></span></label>
<div class="col-sm-10">
<input type="text" name="product_description[<?php echo $language['language_id']; ?>][bonus_details]" value="<?php echo isset($product_description[$language['language_id']]) ? $product_description[$language['language_id']]['bonus_details'] : ''; ?>" id="input-bonus<?php echo $language['language_id']; ?>" class="form-control" autocomplete="off" />
</div>
</div>]]></add>
</operation>
</file>
ini script full nya di admin

Newbie

Posts

Joined
Thu Mar 08, 2012 2:43 pm

Post by sans » Thu Jun 30, 2016 4:24 pm

Scriptnya aku coba bisa jalan normal, tanpa error.
Pastikan Anda menambahkan field bonus_details di table product_description

kaos jersey, jersey bola, baju bola, baju bola terbaru, baju bola murah


Active Member

Posts

Joined
Tue Dec 07, 2010 9:18 am

Post by docrown » Wed Jul 13, 2016 4:31 pm

sans wrote:Scriptnya aku coba bisa jalan normal, tanpa error.
Pastikan Anda menambahkan field bonus_details di table product_description
Nah bener, sekalian di cek juga penulisannya di script, udah bener atau belum yang udah kamu input

CROWNHORECA – Pusat Peralatan Bakery, Dapur dan Mesin Pendingin Komersial untuk Kebutuhan Industri HORECA. Kunjungi crownhoreca.com


New member

Posts

Joined
Tue Mar 25, 2014 11:12 am

Who is online

Users browsing this forum: No registered users and 1 guest