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.

Vous parlez français ? par ici !
Product Page Error
#1
Posted 05 September 2010 - 11:44 AM
Fatal error: Allowed memory size of 88080384 bytes exhausted (tried to allocate 46 bytes) in [link] on line 2196
Any idea to fix?
--
#2
Posted 05 September 2010 - 01:08 PM
#3
Posted 05 September 2010 - 01:24 PM
Products Category v1.2.1
Display products of the same category on the product page
Now it working fine. But again when I install the module I get the same error. Any fix?
#4
Posted 06 September 2010 - 04:24 AM
#5
Posted 06 September 2010 - 04:31 AM
#6
Posted 06 September 2010 - 08:51 AM
$sizeOfCategoryProducts = $category->getProducts(intval($cookie->id_lang), 1, 30, NULL, NULL, true);
to:
$sizeOfCategoryProducts = $category->getProducts(intval($cookie->id_lang), 1, 10, NULL, NULL, true);
and lines 84-89 from:
// If products tab higher than 30, slice it
if ($sizeOfCategoryProducts > 30)
{
$categoryProducts = array_slice($categoryProducts, $middlePosition - 15, 30, true);
$middlePosition = 15;
}
to:
// If products tab higher than 10, slice it
if ($sizeOfCategoryProducts > 10)
{
$categoryProducts = array_slice($categoryProducts, $middlePosition - 5, 10, true);
$middlePosition = 5;
}
#7
Posted 06 September 2010 - 02:27 PM
Also Kindly see to the attachment which this thread. I got the error message when I tried to import products to the shop I dont know why so many products were not able to load into the store though all single and double quotes in all names and descriptions i mentioned as HTML Ascii code so that it wont clash with MySQL Syntax. Any fix for this?
Attached File(s)
Import_Error.pdf (399bytes)
Number of downloads: 328
#8
Posted 07 September 2010 - 01:50 AM
The reason those product names are failing may be because they are longer than 128 characters, which is the maximum a product name is allowed to be, or they have symbols that are not allowed. What version of PrestaShop are you using? I'm using PrestaShop v1.3.1 and looking at the code, only <>;=#{} are not allowed. It seems many of those failed named have an ' or : though. If you are using an older version of PrestaShop, perhaps one of them is being disallowed.
#9
Posted 07 September 2010 - 04:13 AM
How do I change the character limit for Product Name. and what will be the best solution for me to upload product with :, ;, [] characters.
#10
Posted 07 September 2010 - 04:45 AM
return preg_match('/^[^<>;=#{}]*$/ui', $name);
You can change it to the following to allow ; in your product names:
return preg_match('/^[^<>=#{}]*$/ui', $name);
To change the character limit is difficult. You will need to edit your database using phpMyAdmin and increase the size of the 'name' field in the 'ps_product' table from 128 to however many characters you need. Then edit classes/Product.php and change line 188:
'meta_title' => 128, 'link_rewrite' => 128, 'name' => 128, 'available_now' => 255, 'available_later' => 255);
Change the 128 after 'name' to the maximum number of characters you changed the name to be in the database.
#11
Posted 07 September 2010 - 05:15 AM
#12
Posted 07 September 2010 - 05:23 AM
#13
Posted 07 September 2010 - 05:27 AM
#14
Posted 08 September 2010 - 07:28 PM
When I use $product->price leads to same output as $product_wholesale_price why so?
#15
Posted 09 September 2010 - 01:26 AM
#16
Posted 09 September 2010 - 03:13 AM
Also I have one more query.
In home page I implemented JQuery Tabs to each category for featured products now I want to display featured product for each category separately how to achieve this.
Now I am using
$category = new Category(1);
$products = $category->getProducts(1, 1, 6);
$smarty->assign(array('products' => $products, 'homeSize' => Image::getSize('home')));
This returns all the homefeatured products under all categories but I need for specific category.
#17
Posted 09 September 2010 - 05:02 AM
$categories = Category::getSimpleCategories($params['cookie']->id_lang);
$products = array();
foreach ($categories as $category)
{
$categoryObj = new Category($category['id_category'], $params['cookie']->id_lang);
$products[$category['id_category']] = $categoryObj->getProducts($params['cookie']->id_lang, 1, 6);
}
$smarty->assign(array('cat_products' => $products, 'homeSize' => Image::getSize('home')));
This code will get the first 6 products from every category. You can then use code like the following in homefeatured.tpl:
{foreach from=$cat_products key=id_category item=products}
{foreach from=$products item=product}
- Product code goes here
{/foreach}
{/foreach}
#18
Posted 09 September 2010 - 05:51 AM
#19
Posted 09 September 2010 - 06:18 AM
#20
Posted 09 September 2010 - 04:45 PM
1. I want to mask the "Your Address" section from the registration page. I want to get only Email and Password alone in registration time remaining fields can be updated at any time from My Profile page
2. I want to have the friendly URL as /ean13-title-reference.html not like /id_product-title-reference.html How can I achieve this.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











