Jump to content
Sign in to follow this  
63mb3l

[Help] semua produk menghilang dari list...?

Recommended Posts

para sesepuh sekalian ane punya sedikit masalah ni... mohon bantuannya.....

 

semua produk list ane menghilang.... muncul cuman beberapa detik langsung ilang lg.....

 

pas ane cek pake

'display_errors', 'on'

 

ada scritp yg error tp yg aneh nya semua product muncul meskipun warnanya agak memudar kek kena disable gitu....

 

error nya

 

Warning: Invalid argument supplied for foreach() in /home/sebo/public_html/balisilverjewellry.com/prestashop/classes/CompareProduct.php on line 36

 

ini full script CompareProduct.php

 

<?php
class CompareProduct extends ObjectModel
{
public  $id;
public   $id_product;
public   $id_guest;
public   $id_customer;
public   $date_add;
public   $date_upd;
protected  $fieldRequired = array(
 'id_product',
 'id_guest',
 'id_customer');
protected  $fieldsValidate = array(
 'id_product' => 'isUnsignedInt',
 'id_guest' => 'isUnsignedInt',
 'id_customer' => 'isUnsignedInt'
);
protected $table = 'compare_product';
protected $identifier = 'id_compare_product';
/**
 * Get all compare products of the guest
 * @param int $id_guest
 * @return array
 */

public static function getGuestCompareProducts($id_guest)
{
 $results = Db::getInstance()->ExecuteS('
 SELECT DISTINCT `id_product`
 FROM `'._DB_PREFIX_.'compare_product`
 WHERE `id_guest` = '.(int)($id_guest));
 $compareProducts = null;
 foreach($results as $result)
  $compareProducts[] = $result['id_product'];
 return $compareProducts;
}
/**
 * Add a compare product for the guest
 * @param int $id_guest, int $id_product
 * @return boolean
 */
public static function addGuestCompareProduct($id_guest, $id_product)
{
 return Db::getInstance()->Execute('
  INSERT INTO `'._DB_PREFIX_.'compare_product` (`id_product`, `id_guest`, `date_add`, `date_upd`)
  VALUES ('.(int)($id_product).', '.(int)($id_guest).', NOW(), NOW())
 ');
}
/**
 * Remove a compare product for the guest
 * @param int $id_guest, int $id_product
 * @return boolean
 */
public static function removeGuestCompareProduct($id_guest, $id_product)
{
 return Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'compare_product` WHERE `id_guest` = '.(int)($id_guest).' AND `id_product` = '.(int)($id_product));
}
/**
 * Get the number of compare products of the guest
 * @param int $id_guest
 * @return int
 */
public static function getGuestNumberProducts($id_guest)
{
 return (int)(Db::getInstance()->getValue('
  SELECT count(`id_compare_product`)
  FROM `'._DB_PREFIX_.'compare_product`
  WHERE `id_guest` = '.(int)($id_guest)));;
}
/**
 * Get all comapare products of the customer
 * @param int $id_customer
 * @return array
 */
public static function getCustomerCompareProducts($id_customer)
{
 $results = Db::getInstance()->ExecuteS('
 SELECT DISTINCT `id_product`
 FROM `'._DB_PREFIX_.'compare_product`
 WHERE `id_customer` = '.(int)($id_customer));
 $compareProducts = null;
 foreach($results as $result)
  $compareProducts[] = $result['id_product'];
 return $compareProducts;
}
/**
 * Add a compare product for the customer
 * @param int $id_customer, int $id_product
 * @return boolean
 */
public static function addCustomerCompareProduct($id_customer, $id_product)
{
  return Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'compare_product` (`id_product`, `id_customer`, `date_add`, `date_upd`) VALUES ('.(int)($id_product).', '.(int)($id_customer).', NOW(), NOW())');
}
/**
 * Remove a compare product for the customer
 * @param int $id_customer, int $id_product
 * @return boolean
 */
public static function removeCustomerCompareProduct($id_customer, $id_product)
{
 return Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'compare_product` WHERE `id_customer` = '.(int)($id_customer).' AND `id_product` = '.(int)($id_product));
}
/**
 * Get the number of compare products of the customer
 * @param int $id_customer
 * @return int
 */
public static function getCustomerNumberProducts($id_customer)
{
 return (int)(Db::getInstance()->getValue('
  SELECT count(`id_compare_product`)
  FROM `'._DB_PREFIX_.'compare_product`
  WHERE `id_customer` = '.(int)($id_customer)));
}
/**
 * Clean entries which are older than the period
 * @param string $period
 * @return void
 */
public static function cleanCompareProducts($period = 'week')
{
 if ($period === 'week')
  $interval = '1 WEEK';
 elseif ($period === 'month')
  $interval = '1 MONTH';
 elseif ($period === 'year')
  $interval = '1 YEAR';
 else
  return;
 if ($interval != null)
 {
  Db::getInstance()->Execute('
  DELETE FROM `'._DB_PREFIX_.'compare_product`
  WHERE date_upd < DATE_SUB(NOW(), INTERVAL '.pSQL($interval).')');
 }
}
}

 

 

Ini TKP nya

 

ane pake ps 1440 sm 1441 hasil nya sama.....

Share this post


Link to post
Share on other sites

Apakah website Anda diserang?

web satu nya lg...yg kena tp list product nya gak ilang, tp ada kemungkinan ini jg kena.... dah patch ngikutin tatetertib nya... yg pake herfix.... masih ttp kek gini....

 

ada solusinya???

 

thx...

Share this post


Link to post
Share on other sites

udah kelar masalah nya.....

 

terpaksa bikin ulang... :( untung masih punya backup DB nya.... :D

Share this post


Link to post
Share on other sites

udah kelar masalah nya.....

 

terpaksa bikin ulang... :( untung masih punya backup DB nya.... :D

penyebabnya udah ketahuan ?

Share this post


Link to post
Share on other sites

penyebabnya udah ketahuan ?

penyebabnya pasti dari kejadian PS kena hack itu..... yg penting DB nya masih selamat... jd tinggal bikin ulang web nya....

 

 

SIlahkan baca informasi ini :

http://www.prestasho...ge__pid__615938

 

udah di coba tp masih ttp blank.....

 

THX..... all....

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More