Jump to content

Honey93

Members
  • Posts

    18
  • Joined

  • Last visited

Profile Information

  • First Name
    Honey
  • Last Name
    Thakuria

Honey93's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi, I am getting the error after uploading the attachment and editing then clicking the product editing page from backend ContextErrorException in ProductOptions.php line 217:Notice: Undefined offset: 29 in ProductOptions.php line 217 at ErrorHandler->handleError('8', 'Undefined offset: 29', '/var/www/html/prestashop/src/PrestaShopBundle/Form/Admin/Product/ProductOptions.php', '217', array('value' => '30', 'key' => 'ab08c594752cd9a581ebd8ee9b4612499c6122b2', 'index' => '30')) in ProductOptions.php line 217 at ProductOptions->PrestaShopBundle\Form\Admin\Product\{closure}('30', 'ab08c594752cd9a581ebd8ee9b4612499c6122b2', '30') at call_user_func(object(Closure), '30', 'ab08c594752cd9a581ebd8ee9b4612499c6122b2', '30') in DefaultChoiceListFactory.php line 165 at DefaultChoiceListFactory::addChoiceView('30', '30', object(Closure), array('ab08c594752cd9a581ebd8ee9b4612499c6122b2'), '1', null, array(), array(), array()) in DefaultChoiceListFactory.php line 231 at DefaultChoiceListFactory::addChoiceViewsGroupedBy(array('ab08c594752cd9a581ebd8ee9b4612499c6122b2' => '30'), object(Closure), array('30'), array('ab08c594752cd9a581ebd8ee9b4612499c6122b2'), '1', null, array(), array(), array()) in DefaultChoiceListFactory.php line 130 at DefaultChoiceListFactory->createView(object(ArrayChoiceList), array(), object(Closure), '1', null, null) in PropertyAccessDecorator.php line 232 at PropertyAccessDecorator->createView(object(ArrayChoiceList), array(), object(Closure), null, null, null) in CachingFactoryDecorator.php line 197 at CachingFactoryDecorator->createView(object(ArrayChoiceList), array(), object(Closure), null, null, null) in ChoiceType.php line 508 at ChoiceType->createChoiceListView(object(ArrayChoiceList), array('block_name' => null, 'disabled' => false, 'label_format' => null, 'translation_domain' => null, 'auto_initialize' => true, 'trim' => true, 'max_length' => null, 'pattern' => null, 'property_path' => null, 'mapped' => true, 'by_reference' => true, 'virtual' => null, 'method' => 'POST', 'action' => '', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'error_mapping' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', 'csrf_protection' => true, 'csrf_field_name' => '_token', 'csrf_message' => 'The CSRF token is invalid. Please try to resubmit the form.', 'intention' => null, 'empty_value' => object(Exception), 'label' => 'Attachments for this product:', 'read_only' => false, 'attr' => array('data' => array(array('id_attachment' => '30', 'file' => 'ab08c594752cd9a581ebd8ee9b4612499c6122b2', 'file_name' => 'Upload_.csv', 'file_size' => '236', 'mime' => 'text/plain', 'id_lang' => '1', 'name' => 'Excel File', 'description' => ''))), 'data_class' => null, 'expanded' => true, 'multiple' => true, 'empty_data' => array(), 'required' => false, 'error_bubbling' => false, 'label_attr' => array(), 'inherit_data' => false, 'compound' = What am I doing wrong, if someone can help me out ?
  2. uploading attachment is throwing the error. Can anybody help me out with it ? ContextErrorException in ProductOptions.php line 217:Notice: Undefined offset: 29in ProductOptions.php line 217 at ErrorHandler->handleError('8', 'Undefined offset: 29', '/var/www/html/prestashop/src/PrestaShopBundle/Form/Admin/Product/ProductOptions.php', '217', array('value' => '30', 'key' => 'ab08c594752cd9a581ebd8ee9b4612499c6122b2', 'index' => '30')) in ProductOptions.php line 217 at ProductOptions->PrestaShopBundle\Form\Admin\Product\{closure}('30', 'ab08c594752cd9a581ebd8ee9b4612499c6122b2', '30') at call_user_func(object(Closure), '30', 'ab08c594752cd9a581ebd8ee9b4612499c6122b2', '30') in DefaultChoiceListFactory.php line 165 at DefaultChoiceListFactory::addChoiceView('30', '30', object(Closure), array('ab08c594752cd9a581ebd8ee9b4612499c6122b2'), '1', null, array(), array(), array()) in DefaultChoiceListFactory.php line 231 at DefaultChoiceListFactory::addChoiceViewsGroupedBy(array('ab08c594752cd9a581ebd8ee9b4612499c6122b2' => '30'), object(Closure), array('30'), array('ab08c594752cd9a581ebd8ee9b4612499c6122b2'), '1', null, array(), array(), array()) in DefaultChoiceListFactory.php line 130 at DefaultChoiceListFactory->createView(object(ArrayChoiceList), array(), object(Closure), '1', null, null) in PropertyAccessDecorator.php line 232 at PropertyAccessDecorator->createView(object(ArrayChoiceList), array(), object(Closure), null, null, null) in CachingFactoryDecorator.php line 197 at CachingFactoryDecorator->createView(object(ArrayChoiceList), array(), object(Closure), null, null, null) in ChoiceType.php line 508 at ChoiceType->createChoiceListView(object(ArrayChoiceList), array('block_name' => null, 'disabled' => false, 'label_format' => null, 'translation_domain' => null, 'auto_initialize' => true, 'trim' => true, 'max_length' => null, 'pattern' => null, 'property_path' => null, 'mapped' => true, 'by_reference' => true, 'virtual' => null, 'method' => 'POST', 'action' => '', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'error_mapping' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', 'csrf_protection' => true, 'csrf_field_name' => '_token', 'csrf_message' => 'The CSRF token is invalid. Please try to resubmit the form.', 'intention' => null, 'empty_value' => object(Exception), 'label' => 'Attachments for this product:', 'read_only' => false, 'attr' => array('data' => array(array('id_attachment' => '30', 'file' => 'ab08c594752cd9a581ebd8ee9b4612499c6122b2', 'file_name' => 'Upload_.csv', 'file_size' => '236', 'mime' => 'text/plain', 'id_lang' => '1', 'name' => 'Excel File', 'description' => ''))), 'data_class' => null, 'expanded' => true, 'multiple' => true, 'empty_data' => array(), 'required' => false, 'error_bubbling' => false, 'label_attr' => array(), 'inherit_data' => false, 'compound' = ContextErrorException in ProductOptions.php line 217:Notice: Undefined offset: 29
  3. Can any one just let me know, if one can upload attachment from S3 to Prestashop instead of /download folder.
  4. HI Vlester, Your Solution works fine, but could you let me know if we can upload images from AWS S3 instead of /download folder in this case.
  5. Not able to Add to Cart after disabling Stock Management from Shop Parameters -> Product Setting -> Products Stock. Bsically I want every product to get added to cart irrespective of their quantity. There is an option to do allow orders when out of stock by going to product setting but it is to be done for individual product. I want it to get happen for every product by default. What should I do ?
  6. Not able to see the images of Products as well as the Product Details Page after moving Prestashop to AWS Ec2 Ubuntu
  7. Tried to change the values of specific price table by changing the value at the time of submission in the Admin Product Controller.php but it is not working. Also let me know that how can I find out the view files related to Add a Specific Price. public function processPriceAddition() { // Check if a specific price has been submitted if (!Tools::getIsset('submitPriceAddition')) { return; } $id_product = Tools::getValue('id_product'); $id_product = 45; // Chaged the Default value but it is not getting updated in the table; $id_product_attribute = Tools::getValue('sp_id_product_attribute'); $id_shop = Tools::getValue('sp_id_shop'); $id_currency = Tools::getValue('sp_id_currency'); $id_country = Tools::getValue('sp_id_country'); $id_group = Tools::getValue('sp_id_group'); $id_customer = Tools::getValue('sp_id_customer'); $price = Tools::getValue('leave_bprice') ? '-1' : Tools::getValue('sp_price'); $from_quantity = Tools::getValue('sp_from_quantity'); $reduction = (float)(Tools::getValue('sp_reduction')); $reduction_tax = Tools::getValue('sp_reduction_tax'); $reduction_type = !$reduction ? 'amount' : Tools::getValue('sp_reduction_type'); $reduction_type = $reduction_type == '-' ? 'amount' : $reduction_type; $from = Tools::getValue('sp_from'); if (!$from) { $from = '0000-00-00 00:00:00'; } $to = Tools::getValue('sp_to'); if (!$to) { $to = '0000-00-00 00:00:00'; } if (($price == '-1') && ((float)$reduction == '0')) { $this->errors[] = Tools::displayError('No reduction value has been submitted'); } elseif ($to != '0000-00-00 00:00:00' && strtotime($to) < strtotime($from)) { $this->errors[] = Tools::displayError('Invalid date range'); } elseif ($reduction_type == 'percentage' && ((float)$reduction <= 0 || (float)$reduction > 100)) { $this->errors[] = Tools::displayError('Submitted reduction value (0-100) is out-of-range'); } elseif ($this->_validateSpecificPrice($id_shop, $id_currency, $id_country, $id_group, $id_customer, $price, $from_quantity, $reduction, $reduction_type, $from, $to, $id_product_attribute)) { $specificPrice = new SpecificPrice(); $specificPrice->id_product = (int)$id_product; $specificPrice->id_product_attribute = (int)$id_product_attribute; $specificPrice->id_shop = (int)$id_shop; $specificPrice->id_currency = (int)($id_currency); $specificPrice->id_country = (int)($id_country); $specificPrice->id_group = (int)($id_group); $specificPrice->id_customer = (int)$id_customer; $specificPrice->price = (float)($price); $specificPrice->from_quantity = (int)($from_quantity); $specificPrice->reduction = (float)($reduction_type == 'percentage' ? $reduction / 100 : $reduction); $specificPrice->reduction_tax = $reduction_tax; $specificPrice->reduction_type = $reduction_type; $specificPrice->from = $from; $specificPrice->to = $to; if (!$specificPrice->add()) { $this->errors[] = Tools::displayError('An error occurred while updating the specific price.'); } } }
  8. Notice: Undefined index: name in /var/www/html/prestashop/controllers/admin/AdminAccessController.php on line 196 Also let me know, how to approach to solve this kind of problem ? Which Logs should I access to check this type of problem.
  9. Hosted Prestashop on AWS EC2 and imported database on AWS RDS and configured app/config/parameters.php file with the credentials still getting the error ... Did chmod -R 777 /var/www/html/prestashop/app too ... Note: I am migrating existing Prestahop to the Ec2 from my local system.
  10. Changed /app/config/parameters.php files parameter .. still showing these errors
  11. Uploaded the prestashop 1.7 code on Ec2 and Database dump on AWS RDS and have changes /config/bootstrap.php with credentials ... Still facing issues ... define('_DB_SERVER_', $database_host); define('_DB_NAME_', $config['parameters']['database_name']); define('_DB_USER_', $config['parameters']['database_user']); define('_DB_PASSWD_', $config['parameters']['database_password']); define('_DB_PREFIX_', $config['parameters']['database_prefix']); define('_MYSQL_ENGINE_', $config['parameters']['database_engine']); define('_PS_CACHING_SYSTEM_', $config['parameters']['ps_caching']); Have Read somewhere to edit setting.inc.php but it was blank so edited bootstrap.php. Error message attached with the post
  12. From my FrontEnd controller trying to load: $this->setTemplate('allproducts.tpl'); Note: 1) views/templates/front/allproducts.tpl is the actual file location 2) Controller location is : controllers/front/allproducts.php But getting error: 500 Server ErrorOops, something went wrong. Try to refresh this page or feel free to contact us if the problem persists.
  13. I deleted prestashop/cache/smarty/cache, prestashop/cache/smarty/compile folder contents but still it is not working ..
  14. From Superadmin created a module "Projects" which is working fine. But when assigned it's permission to a different profile and tried to open from there it is throwing this error: [PrestaShop] Fatal error in module file :C:\xampp\htdocs\prestashop\app\bootstrap.php.cache: Uncaught exception 'SmartyException' with message 'Unable to load template file 'C:\xampp\htdocs\prestashop\admin310roeavh/themes/default\template\content-legacy.tpl'' in C:\xampp\htdocs\prestashop\vendor\prestashop\smarty\sysplugins\smarty_internal_templatebase.php:129 Stack trace: #0 C:\xampp\htdocs\prestashop\classes\controller\AdminController.php(1757): Smarty_Internal_TemplateBase->fetch() #1 C:\xampp\htdocs\prestashop\classes\controller\Controller.php(221): AdminControllerCore->display() #2 C:\xampp\htdocs\prestashop\classes\Dispatcher.php(366): ControllerCore->run() #3 C:\xampp\htdocs\prestashop\admin310roeavh\index.php(95): DispatcherCore->dispatch() #4 {main} Next exception 'LogicException' with message 'Request stack is empty' in C:\xampp\htdocs\prestashop\app\bootstrap.php.cache:3216 Stack trace: #0 [internal function]: Symfony\Component\HttpKernel\HttpKernel->terminateWithException(Object(SmartyException)) #1 C:\xampp\htdocs\prestashop\app\cache\prod\classes.php(2072): call_user_func(Array, Objec
×
×
  • Create New...