
Edge_jr
Members-
Posts
73 -
Joined
-
Last visited
Everything posted by Edge_jr
-
Hi, I am working to develop Add/Edit/Delete/Search/Bulk Delete operation in module admin controller. The delete operation working fine but edit not working. Also what to use for add/search/Bulk Edit operations. if (Tools::isSubmit('delete'.$this->table)) { // function work } if (Tools::isSubmit('edit'.$this->table)) { // function work } Any idea?
-
Hi, I want to run one task daily at some time automatically. I am searching for the hook which will trigger daily for example 12 AM or any other specified time. Currently I have to run the script in the cron job to do the job. Any idea?
-
PrestaShop one signal integration how to do
Edge_jr replied to Edge_jr's topic in Addons, modules and themes developers
Thanks Zohaib. I will get in contact with you. -
Hide Back-office hide module install and configure buttons from code.
Edge_jr replied to Edge_jr's topic in Core developers
Thanks, Can you help me with a screenshot? I found root/src/PrestaShopBundle/Controller/Admin/ModuleController.php has functions related to it. Any idea how to hide from the code file? -
htaccess Prestashop htaccess speed optimization
Edge_jr replied to Edge_jr's topic in General topics
Thanks Zohaib and El Patron -
htaccess Prestashop how to set values in php.ini file using htaccess
Edge_jr replied to Edge_jr's topic in Core developers
Thanks Zohaib. -
How can I get the cover image of the product? From PHP file, not tpl file. I saw a post regarding getting the image in tpl file.
-
Hi, Any idea what code needs to be added in htaccess to increase the speed and optimization website?
-
redirectiom Prestashop redirect non-www to www using .htaccess
Edge_jr replied to Edge_jr's topic in Online sales and SEO
Thanks. It works fine. -
Hi, I am getting errors when trying to reset the password. I change some changes as per suggestions in the ps_configuration table and others but had no success in solving the problem. I found code in below file related to error message. prestashop\controllers\front\PasswordController.php I feel token from email and system do not match as per code condition. if($customer->getValidResetPasswordToken() !== $reset_token) protected function changePassword() { $token = Tools::getValue('token'); $id_customer = (int) Tools::getValue('id_customer'); $reset_token = Tools::getValue('reset_token'); $email = Db::getInstance()->getValue( 'SELECT `email` FROM ' . _DB_PREFIX_ . 'customer c WHERE c.`secure_key` = \'' . pSQL($token) . '\' AND c.id_customer = ' . $id_customer ); if ($email) { $customer = new Customer(); $customer->getByEmail($email); if (!Validate::isLoadedObject($customer)) { $this->errors[] = $this->trans('Customer account not found', [], 'Shop.Notifications.Error'); } elseif (!$customer->active) { $this->errors[] = $this->trans('You cannot regenerate the password for this account.', [], 'Shop.Notifications.Error'); } elseif ($customer->getValidResetPasswordToken() !== $reset_token) { $this->errors[] = $this->trans('The password change request expired. You should ask for a new one.', [], 'Shop.Notifications.Error'); } if ($this->errors) { return; } if ($isSubmit = Tools::isSubmit('passwd')) { // If password is submitted validate pass and confirmation if (!$passwd = Tools::getValue('passwd')) { $this->errors[] = $this->trans('The password is missing: please enter your new password.', [], 'Shop.Notifications.Error'); } if (!$confirmation = Tools::getValue('confirmation')) { $this->errors[] = $this->trans('The confirmation is empty: please fill in the password confirmation as well', [], 'Shop.Notifications.Error'); } if ($passwd && $confirmation) { if ($passwd !== $confirmation) { $this->errors[] = $this->trans('The password and its confirmation do not match.', [], 'Shop.Notifications.Error'); } if (!Validate::isPasswd($passwd)) { $this->errors[] = $this->trans('The password is not in a valid format.', [], 'Shop.Notifications.Error'); } } } if (!$isSubmit || $this->errors) { // If password is NOT submitted OR there are errors, shows the form (and errors) $this->context->smarty->assign([ 'customer_email' => $customer->email, 'customer_token' => $token, 'id_customer' => $id_customer, 'reset_token' => $reset_token, ]); $this->setTemplate('customer/password-new'); } else { // Both password fields posted. Check if all is right and store new password properly. if (!$reset_token || (strtotime($customer->last_passwd_gen . '+' . (int) Configuration::get('PS_PASSWD_TIME_FRONT') . ' minutes') - time()) > 0) { Tools::redirect('index.php?controller=authentication&error_regen_pwd'); } else { $customer->passwd = $this->get('hashing')->hash($password = Tools::getValue('passwd'), _COOKIE_KEY_); $customer->last_passwd_gen = date('Y-m-d H:i:s', time()); if ($customer->update()) { Hook::exec('actionPasswordRenew', ['customer' => $customer, 'password' => $password]); $customer->removeResetPasswordToken(); $customer->update(); $mail_params = [ '{email}' => $customer->email, '{lastname}' => $customer->lastname, '{firstname}' => $customer->firstname, ]; if ( Mail::Send( $this->context->language->id, 'password', $this->trans( 'Your new password', [], 'Emails.Subject' ), $mail_params, $customer->email, $customer->firstname . ' ' . $customer->lastname ) ) { $this->context->smarty->assign([ 'customer_email' => $customer->email, ]); $this->success[] = $this->trans('Your password has been successfully reset and a confirmation has been sent to your email address: %s', [$customer->email], 'Shop.Notifications.Success'); $this->context->updateCustomer($customer); $this->redirectWithNotifications('index.php?controller=my-account'); } else { $this->errors[] = $this->trans('An error occurred while sending the email.', [], 'Shop.Notifications.Error'); } } else { $this->errors[] = $this->trans('An error occurred with your account, which prevents us from updating the new password. Please report this issue using the contact form.', [], 'Shop.Notifications.Error'); } } } } else { $this->errors[] = $this->trans('We cannot regenerate your password with the data you\'ve submitted', [], 'Shop.Notifications.Error'); } }
-
Thanks. The solutions work fine.
-
Hi, Like below how to get logo URL of the shop $PS_SHOP_DOMAIN_SSL = Configuration::get('PS_SHOP_DOMAIN_SSL'); $PS_SHOP_NAME = Configuration::get('PS_SHOP_NAME');
-
Below settings not working on the right column hook on the module. Attached screenshot. It works fine on checkout, cart, login, and other pages of the website. Theme & Logo => Choose layouts => Order confirmation => Two Columns with Small Right Column.
-
Hi, I want to know how to hook the module on the last page of the order confirmation. What is the hook name that will work as shown in the screenshot? Attached screenshot.
-
product PrestaShop hide product attributes values in the URL
Edge_jr replied to Edge_jr's topic in Core developers
Many thanks for the support. The problem is solved on ps 1.7- 5 replies
-
- url
- attributes
-
(and 5 more)
Tagged with:
-
product PrestaShop hide product attributes values in the URL
Edge_jr posted a topic in Core developers
Hi, I want to know how to hide product attributes values in the URL For example URL with product attributes values => https://www.mydomain.com/men/1-1-hummingbird-printed-t-shirt.html#/1-size-s/8-color-white New URL => https://www.mydomain.com/men/1-1-hummingbird-printed-t-shirt.html Please help and advise.- 5 replies
-
- url
- attributes
-
(and 5 more)
Tagged with: