-
Posts
515 -
Joined
-
Last visited
-
Days Won
3
sandipchandela last won the day on August 27 2016
sandipchandela had the most liked content!
About sandipchandela
- Birthday 06/01/1987
Contact Methods
-
Skype
sandipchandela
Profile Information
-
Location
India
-
Interests
programming, roaming, listening music
-
Activity
Developer
Recent Profile Visitors
15,028,030 profile views
sandipchandela's Achievements
-
While viewing the performance page, facing the below error. PS version 1.7.7.5 with PHP 7.3 Twig\Error\ RuntimeError in src/PrestaShopBundle/Resources/views/Admin/layout.html.twig (line 37) headerTabContent is defined ? headerTabContent : '', enableSidebar is defined ? enableSidebar : false, help_link is defined ? help_link : '', js_router_metadata(), meta_title is defined ? meta_title : '', use_regular_h1_structure is defined ? use_regular_h1_structure : true ) )) %}{% import '@PrestaShop/Admin/macros.html.twig' as ps %}
-
In the `var` directory, there are some files created with `ps_accounts-YYYY-MM-DD` prefix. does any one know what is the use of these? how it can be useful? How to turn it off this? [2021-07-19 05:29:03] ps_accounts.INFO: Loading ps_accounts Env : [] [] [] [2021-07-19 05:29:05] ps_accounts.INFO: Loading ps_accounts Env : [] [] [] [2021-07-19 05:29:05] ps_accounts.INFO: Loading ps_accounts Env : [] [] [] [2021-07-19 05:29:35] ps_accounts.INFO: Loading ps_accounts Env : [] [] [] [2021-07-19 05:29:38] ps_accounts.INFO: Loading ps_accounts Env : [] [] [] [2021-07-19 05:29:39] ps_accounts.INFO: Loading ps_accounts Env : [] [] [] [2021-07-19 05:29:40] ps_accounts.INFO: Loading ps_accounts Env : [] [] [] [2021-07-19 05:29:40] ps_accounts.INFO: Loading ps_accounts Env : [] [] [] [2021-07-19 05:29:42] ps_accounts.INFO: Loading ps_accounts Env : [] [] [] [2021-07-19 05:29:44] ps_accounts.INFO: Loading ps_accounts Env : [] [] [] [2021-07-19 05:29:45] ps_accounts.INFO: Loading ps_accounts Env : [] [] [] [2021-07-19 05:29:48] ps_accounts.INFO: Loading ps_accounts Env : [] [] [] [2021-07-19 05:29:49] ps_accounts.INFO: Loading ps_accounts Env : [] [] [] [2021-07-19 05:29:49] ps_accounts.INFO: Loading ps_accounts Env : [] [] []
-
While changing the theme, I'm getting an below error. Symfony\Component\Debug\Exception\ContextErrorException: Warning: Error while sending QUERY packet. PID=194476 at classes/db/DbPDO.php:165 at DbPDOCore->_query(' SELECT r.`slug` FROM `psnz_authorization_role` r INNER JOIN `psnz_access` a ON a.`id_authorization_role` = r.`id_authorization_role` WHERE a.`id_profile` = "1" ') (classes/db/Db.php:376) at DbCore->query(' SELECT r.`slug` FROM `psnz_authorization_role` r INNER JOIN `psnz_access` a ON a.`id_authorization_role` = r.`id_authorization_role` WHERE a.`id_profile` = "1" ') (classes/db/Db.php:613) at DbCore->executeS(' SELECT r.`slug` FROM `psnz_authorization_role` r INNER JOIN `psnz_access` a ON a.`id_authorization_role` = r.`id_authorization_role` WHERE a.`id_profile` = "1" ') (classes/Access.php:111) at AccessCore::getRoles(1)
-
I want to make a script that will load all the products. Each product will load their all combinations if found any and make a default image selection for that combination. Refer image for better explanation. There is a black color combination and for that i want to make a default image selection for image of first position.
-
It is working for me in PS 1.6.1.20 Making this $product_ids array as follows: $product_ids = array( array('product_id' => '8', 'incl_tax' => 1, 'price' => 9, 'from_quantity' => 1, 'reduction_price' => '10', 'reduction_percent' => 2, 'reduction_from' => '0000-00-00 00:00:00', 'reduction_to' => '0000-00-00 00:00:00'), array('product_id' => '2', 'from_quantity' => 1, 'reduction_price' => '8', 'reduction_percent' => 2, 'reduction_from' => '0000-00-00 00:00:00', 'reduction_to' => '0000-00-00 00:00:00'), array('product_id' => '18', 'from_quantity' => 5, 'reduction_price' => '5', 'reduction_percent' => 2, 'reduction_from' => '0000-00-00 00:00:00', 'reduction_to' => '0000-00-00 00:00:00'), array('product_id' => '2', 'from_quantity' => 5, 'reduction_price' => '3', 'reduction_percent' => 2, 'reduction_from' => '0000-00-00 00:00:00', 'reduction_to' => '0000-00-00 00:00:00'), array('product_id' => '8', 'from_quantity' => 40, 'reduction_percent' => 40, 'reduction_from' => '0000-00-00 00:00:00', 'reduction_to' => '0000-00-00 00:00:00') ); Call below method by looping `product_id` foreach ($product_ids as $row) { $pid = (int)$row['product_id']; $result = array(); if ((isset($row['reduction_price']) && $row['reduction_price'] > 0) || (isset($row['reduction_percent']) && $row['reduction_percent'] > 0)) { $result['item'] = $this->addSpecificPrice($pid, $row); $updated++; } else { $result['error'] = $pid; $fail++; } } public function addSpecificPrice($pid, $info) { try { $id_shop = $this->getDefaultPSShop(); $specific_price = SpecificPrice::getSpecificPrice((int)$pid, $id_shop, 0, 0, 0, (int)$info['from_quantity'], 0, 0, 0, 0); if (is_array($specific_price) && isset($specific_price['id_specific_price'])) { $specific_price = new SpecificPrice((int)$specific_price['id_specific_price']); } else { $specific_price = new SpecificPrice(); } $specific_price->id_product = (int)$pid; $specific_price->id_specific_price_rule = 0; $specific_price->id_shop = $id_shop; $specific_price->id_currency = 0; $specific_price->id_country = 0; $specific_price->id_group = 0; $specific_price->price = (isset($info['price']) && $info['price']) ? $info['price'] : -1; $specific_price->id_customer = 0; $specific_price->from_quantity = (isset($info['from_quantity']) && $info['from_quantity']) ? $info['from_quantity'] : 1; if ($specific_price->price > 1) { $specific_price->reduction = 0; $specific_price->reduction_type ='amount'; } else { $specific_price->reduction = (isset($info['reduction_price']) && $info['reduction_price']) ? (float)str_replace(',', '.', $info['reduction_price']) : $info['reduction_percent'] / 100; $specific_price->reduction_type = 'percentage'; } $specific_price->reduction_tax = (isset($info['incl_tax']) && $info['incl_tax']) ? 1 : 0; //$specific_price->reduction_type = (isset($info['reduction_price']) && $info['reduction_price']) ? 'amount' : 'percentage'; $specific_price->from = (isset($info['reduction_from']) && Validate::isDate($info['reduction_from'])) ? $info['reduction_from'] : '0000-00-00 00:00:00'; $specific_price->to = (isset($info['reduction_to']) && Validate::isDate($info['reduction_to'])) ? $info['reduction_to'] : '0000-00-00 00:00:00'; if (!$specific_price->save()) { return Tools::displayError('An error occurred while updating the specific price.'); } return Tools::displayError('Specific Price has been added/updated.'); } catch (\Exception $e) { return Tools::displayError('An error occurred while updating the specific price.'); } }
-
Problems uploading images [Error]
sandipchandela replied to TadinoStore's topic in Configuring and using PrestaShop
Upgrade to latest version 1.6.1.11 https://www.prestashop.com/en/developers-versions#previous-version -
Account Customer - Newsletter
sandipchandela replied to Sopppppp's topic in Configuring and using PrestaShop
It's too old dude, you are in 2012 if am not wrong. Any way you can find authentication.tpl file in themes/default or themes/prestashop directory. <input type="checkbox" name="optin" id="optin" value="1" {if isset($smarty.post.optin) && $smarty.post.optin == '1'}checked="checked"{/if}> remove if condition or place checked=checked code outside of {if} condition. -
Problems uploading images [Error]
sandipchandela replied to TadinoStore's topic in Configuring and using PrestaShop
hello which version you migrate Cloud to own server ? -
nadie started following sandipchandela
-
Display unit price only !
sandipchandela replied to PixGeek's topic in Configuring and using PrestaShop
If you want to show in following section then you need to change in product-list.tpl file in your active theme directory. theme should be named darkgreen. <ul id="home-page-tabs" backgroud:#fff;"=""> Nos nouveautés Notre séléction Nos meilleures ventes -
PS supports mapping for Category to Products, Manufacturers to Products. If you want to achieve category list under Manufacturer page then you can get like below: Manufacturers Page -> get the products by manufacturer code and get categories of that products and list out that category in tpl file -> then you can show products of that category on page. Its tweak route until you reach. this may lead to performance issue on this page if you have high numbers of catalog size. Thanks