PrestaShop Forums: V1.1 some bugs fixes - PrestaShop Forums

Jump to content


Welcome to the PrestaShop Forum! We hope you'll share your comments and suggestions with us. We ask that you please post in English to the main sections of the PrestaShop Forum. If you want to write in another language, please post in the corresponding PrestaShop Community section below.

Please note that PrestaShop Community sections are largely self-moderated. PrestaShop team members may or may not participate in non-English sections. To improve the chances of receiving feedback to your question or comment, please post it in English to the main sections of our Forum.

NYC

Vous parlez français ? par ici !


V1.1 some bugs fixes


V1.1 some bugs fixes

#1 jolvil

    PrestaShop Fanatic

  • 22 Dec 2007
  • Members
  • PipPipPipPip
  • 2672 posts
  • Location:Paris

Posted 02 January 2009 - 07:22 PM

Here are some bugs fixes for V1.1 Original French Post HERE

--------------------------------------------------------

http://www.prestasho...cker/view/1091/

Cart truncate:

in /modules/blockcart/blockcart.tpl line: 44
find:
{$product.name|escape:htmlall:'UTF-8'|truncate:20} 

replace:
{$product.name|escape:htmlall:'UTF-8'|truncate:16}


in /modules/blockcart/blockcart-json.tpl line: 77
find:
'{$error|addslashes}' 

replace:
'{$error|addslashes|html_entity_decode:2:'UTF-8'}'


--------------------------------------------------------

http://www.prestasho...er_janvier_2009

Stat problem

in /admin/tabs/AdminStatsTab.php line: 36
find
if ($month = Tools::getValue('dateInputMonth', -1) AND Validate::isUnsignedInt($month))

replace
if (($month = Tools::getValue('dateInputMonth', -1)) != -1 AND Validate::isInt($month))


--------------------------------------------------------

http://www.prestasho...cker/view/1080/

in /modules/cheque/cheque.php line: 33

find:
if (!isset($this->address) OR !isset($this->address))

replace:
if (!isset($this->chequeName) OR !isset($this->address))


--------------------------------------------------------

http://www.prestasho...cker/view/1059/

problem with customised product in BO

in /admin/tabs/AdminProduct.php line: 422

find:
$product->customizable = (intval($_POST['uploadable_files']) > 0 OR intval($_POST['text_fields']) > 0) ? true : false;

replace:
$product->customizable = (intval($_POST['uploadable_files']) > 0 OR intval($_POST['text_fields']) > 0) ? 1 : 0;


--------------------------------------------------------

http://www.prestasho...cker/view/1155/
pagination bug in new-products.php

Details:
On new-products page. Pagination block don't show the good number of page.
If there is 3 new-products and 60 products in the database, 3 products are displayed (that good) but there is a link for

each page (1, 2, 3, 4, ... 6) [with the default display 10 products by page].

To correct this bug, In the new-product.php page:

Ok, there is the new correction:

The original file was good:

line 8:
$nbProducts = intval(Product::getNewProducts(intval($cookie->id_lang), NULL,NULL, true));


but in classes/Products.php, getNewProducts was not good
find line 903:
        if ($count)
{
$result = Db::getInstance()->getRow('
SELECT COUNT(`id_product`) AS nb
FROM `'._DB_PREFIX_.'product`
WHERE `active` = 1');
return intval($result['nb']);
}


replace:
        if ($count)
{
$result = Db::getInstance()->getRow('
SELECT COUNT(`id_product`) AS nb
FROM `'._DB_PREFIX_.'product`
WHERE `active` = 1
AND DATEDIFF(`date_add`, DATE_SUB(NOW(), INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY)) > 0');
return intval($result['nb']);
}


Because original count return the number of products on database instead of the number of new products.


----------------------------------------------------------

about products accessories that can't be set off, a tip is given in this post
http://www.prestasho...ad/10492/#48055

in file js/admin.js comment:

/*console.log('---');
console.log(input);
console.log('___');
console.log(name);*/


Quote

About accessories, it's a browser bug , console.log let by devs create bugs with some browsers, not FF2 but FF3 . take off all console.log from javascripts code.


#2 TropischBruin

    PrestaShop Fanatic

  • 06 Oct 2008
  • Moderators
  • 2198 posts
  • Location:Winkel - The Netherlands

Posted 02 January 2009 - 07:42 PM

Quote


We ask that you please post in English to the main sections of the PrestaShop Forum.


Thanks for you help, the problem is that 80% of us do not speak any French so if you could translate this to English then please :-)

Edit: aha, I see now, you added the link to the bug-rapport. Thanks!
Norman in 't VeldtModeratorPrestaShopForums
Help PrestaShop, make a donation!

#3 jolvil

    PrestaShop Fanatic

  • 22 Dec 2007
  • Members
  • PipPipPipPip
  • 2672 posts
  • Location:Paris

Posted 02 January 2009 - 07:47 PM

Patch for little pictures bug not changed in BO

Thanks Pshopexpert LOOK HERE

IN /admin/tabs/AdminProducts.php

FIND line 176

if (isset($_GET['deleteImage']))
{
$image->delete();
deleteImage($image->id_product, $image->id);
if (!Image::getCover($image->id_product))
{
$first_img = Db::getInstance()->getRow('
SELECT `id_image` FROM `'._DB_PREFIX_.'image`
WHERE `id_product` = '.intval($image->id_product));
Db::getInstance()->Execute('
UPDATE `'._DB_PREFIX_.'image`
SET `cover` = 1
WHERE `id_image` = '.intval($first_img['id_image']));


ADD AFTER

@unlink(dirname(__FILE__).'/../../img/tmp/product_'.$image->id_product.'.jpg');
@unlink(dirname(__FILE__).'/../../img/tmp/product_mini_'.$image->id_product.'.jpg');


FIND line 209

elseif (isset($_GET['coverImage']))
{
Image::deleteCover($image->id_product);
$image->cover = 1;
$image->update();


ADD AFTER

@unlink(dirname(__FILE__).'/../../img/tmp/product_'.$image->id_product.'.jpg');
@unlink(dirname(__FILE__).'/../../img/tmp/product_mini_'.$image->id_product.'.jpg');


FIND line 509

public function addProductImage($product, $method = 'auto')


TAKE OFF UNLINK lines 529

@unlink(dirname(__FILE__).'/../../img/tmp/product_'.$product->id.'.jpg');
@unlink(dirname(__FILE__).'/../../img/tmp/product_mini_'.$product->id.'.jpg');


REPLACE WITH

if (sizeof($this->_errors))
return false;
@unlink(dirname(__FILE__).'/../../img/tmp/product_'.$product->id.'.jpg');
@unlink(dirname(__FILE__).'/../../img/tmp/product_mini_'.$product->id.'.jpg');
return ((isset($id_image) AND is_int($id_image) AND $id_image) ? $id_image : true);


#4 cybersteph

    PrestaShop Apprentice

  • 27 Nov 2008
  • Members
  • PipPip
  • 158 posts
  • Location:Hte loire 43 France

Posted 02 January 2009 - 08:32 PM

merçi à toi pour le partage, très bonne idée cette petite liste.
E-commercant depuis 2004
Prestashop V1.2.5 modifié final en production!
PROMAC OSX!!!

#5 Cédric Girard

    PrestaShop Fanatic

  • 20 Jun 2008
  • Members
  • PipPipPipPip
  • 1053 posts
  • Location:CHAUFFOUR LES BAILLY

Posted 02 January 2009 - 11:31 PM

Bonsoir

MAJ effectuées ;-) : super idée que cette liste !

Juste une question sur la correction des "false/true" en "0/1" : dans le même fichier ligne 73 on n'aurait pas le même soucis par hasard ?... Je dis ça je dis rien, juste que je n'ai jamais utilisé de booléens sous cette forme en PHP, je pose donc la question ;-)
EX entrepreneur spécialiste du référencement Prestashop, certifié CESEO - Attention, je n'exerce plus !

Last work : Matériel de cuisine professionnel
Actually : Matériel de cuisine et recettes

#6 jolvil

    PrestaShop Fanatic

  • 22 Dec 2007
  • Members
  • PipPipPipPip
  • 2672 posts
  • Location:Paris

Posted 06 January 2009 - 12:59 PM

updated, if you know some V1.1 fixes, post here please

#7 Fabrice

    PrestaShop Fanatic

  • 28 Jul 2008
  • Moderators
  • 3124 posts
  • Location:Strasbourg - east France

Posted 23 January 2009 - 06:04 PM

ce sujet en post'it, ce serait bien.
merci jolvil. bonne idée !!
Fabrice
http://www.my-deco-shop.com
Projet en cours de lancement - New fantastic module: Checkout-Pro
le meilleur outil de gestion pour Prestashop que j'utilise - best tool I use: Store Commander

#8 rocky

    PrestaShop Superstar

  • 16 Oct 2008
  • US Moderators
  • 9981 posts
  • Location:Australia

Posted 28 January 2009 - 02:23 AM

A fix for AdminBackup.php on line 182 to change ages like "2 days days" to "2 days":

$age = floor($age / 86400).' '.$this->l('days');


to

$age = floor($age / 86400);

Check out Nethercott Constructions for PrestaShop guides and modules. Like us on Facebook for news updates.

Guides Performance Guide | Installation Guide | Development Guide

Modules AJAX Sliding Categories | AJAX Dropdown Categories | Carousel | Image Gallery | Sliding Menu

All free and paid software, modules, themes and modifications are subject to the terms and conditions here.

#9 L. Brett Sinclair

    PrestaShop Apprentice

  • 31 Oct 2008
  • Members
  • PipPip
  • 320 posts

Posted 10 February 2009 - 02:43 PM

a fix to Sort the attributes can be found here:

http://www.prestasho...duct_attributes
Tout sur la Country avec
www.Country-Cowboy.com

Blanchiment des dents avec
www.DentsDeStars.com
:cheese:

#10 Major

    PrestaShop Apprentice

  • 09 Jul 2008
  • Members
  • PipPip
  • 48 posts

Posted 05 April 2009 - 05:22 PM

Correction of the bug #1549: removing customized products from the cart (see forum and bug tracker).

Here are the modifications brought to the cart.php file on my Prestashop version (SVN 687):

1/ Look for:

private function _updateCustomizationQuantity($quantity, $id_customization, $id_product, $id_product_attribute, $operator = 'up')

Line 416, replace:

return $this->_deleteCustomization(intval($id_customization));

with:

return $this->_deleteCustomization($id_product,intval($id_customization),$id_product_attribute);


2/ Look for:

public    function deleteProduct($id_product, $id_product_attribute = NULL, $id_customization = NULL)

Line 495, replace:

return $this->_deleteCustomization(intval($id_customization)) AND $this->deleteProduct(intval($id_product), $id_product_attribute, NULL);

with:

$this->_deleteCustomization($id_product,intval($id_customization),$id_product_attribute) AND $this->deleteProduct(intval($id_product), NULL, $id_product_attribute);


3/ Look for:

private    function _deleteCustomization($id_customization)

Lines 515 to 519, replace:

    private    function _deleteCustomization($id_customization)
{
if (!$result = Db::getInstance()->getRow('SELECT `quantity` FROM `'._DB_PREFIX_.'customization` WHERE `id_customization` = '.intval($id_customization)) OR
!Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'cart_product` SET `quantity` = `quantity` - '.intval($result['quantity'])))
return false;

with:

  private    function _deleteCustomization($id_product, $id_customization, $id_product_attribute=NULL)
{
if (!$result = Db::getInstance()->getRow('SELECT `quantity` FROM `'._DB_PREFIX_.'customization` WHERE `id_customization` = '.intval($id_customization)) OR
!Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'cart_product` SET `quantity` = `quantity` - '.intval($result['quantity']).' WHERE `id_product`='.intval($id_product).' AND `id_cart` = '.intval($this->id).' AND `id_product_attribute` = '.($id_product_attribute != NULL ? intval($id_product_attribute) : '''')))
return false;


#11 www.gozdesm.com

    PrestaShop Apprentice

  • 10 Mar 2009
  • Members
  • PipPip
  • 365 posts

Posted 31 December 2009 - 05:29 PM

Without a screen shot loads

#12 Ann

    PrestaShop Apprentice

  • 02 Jul 2008
  • Members
  • PipPip
  • 363 posts

Posted 02 January 2010 - 08:35 AM

Hi all !

Any hint about stats vanishing in 2010 ?

Cheers !
www.ann-secrets.com
www.mode-des-femmes.com

#13 Zippout

    PrestaShop Newbie

  • 17 Jan 2010
  • Members
  • Pip
  • 5 posts

Posted 10 February 2010 - 07:40 PM

From 1262417743:

Hi all !

Any hint about stats vanishing in 2010 ?

Cheers !


Im in same position, tried everything i can remember 1.1.0.5 Stats visitor always returning 0

Rgds,
Zippoutlet - www.zippoutlet.info





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users