Resolve customer complaints in a few clicks.
Supports Prestashop versions 1.5 and 1.6
License: Other
When the module theme configurator is enabled and used on PrestaShop 1.6, the url is changed because parameters are added.
in consequence, this piece of code in /public/js/yrs_order_history.js (l.98)
function showOrdersButtons() {
if ($('#order-list').length) {
var order_ids = new Array();
$('#order-list tbody tr').each(function() {
var order_href = $(this).find('.history_detail a:last').attr('href');
var order_id = order_href.split('id_order=')[1];
order_ids.push(order_id);
$this = $(this).find('td.history_link');
$('#report-order-' + order_id).remove();
$this.append('<div id="report-order-' + order_id + '" style="min-width:230px;min-height: 36px;"></div>');
showAjaxSpinner('#report-order-' + order_id);
});
When I check the content of the variable order_id
, I get this value:
5&live_configurator_token=13aa9d50afdea4b4771192ccd2027122&id_shop=1&id_employee=1&theme=&theme_font=
and the expected value should be
5
The fancybox plugin is already part of PrestaShop. To avoid any conflicts you cannot include your own version.
You cannot create your own class, you have to use the classes & methods given by the core, i.e: Db::getInstance()->execute(...);
Some files does not respect the PrestaShop's coding standards at all.
As they are not part of a SDK they should use the PrestaShop's coding standards.
Don't forget to use the validator: https://validator.prestashop.com/
The BO configuration form is too "light": https://www.dropbox.com/s/15b4cywhihiczcw/Capture%20d%27%C3%A9cran%202014-07-04%2015.44.45.png
You should add a logo, a title, a description, etc.
For your form to have a better design you should add $this->bootstrap = true; right after the parent::__construct();
The module should display a warning message to inform the merchant if he has not installed the cURL library.
Here is the report from the security review:
# Display products of orders not belonging to the customer
/controllers/front/yrs.php:236 function getOrderDetail()
By bruteforcing order_id, we can see the products of order not belonging to us.
Check $shop_order belong to $this->context->customer->id
Do not use $this->customer_id in this case (as it is done in getOrdersButtons), because it can be defined by only knowing the email of the customer (in authenticateUser() function). If you secure this using $this->customer_id, it would be a bigger vulnerability because we could know what a customer did buy (by enumerating order_id 1,2,3,... with a specific email). Now we can just see products of all the orders, without really knowing to whom those commands belong.
In others cases (getReportClaimsPagePost(),...) it's ok because you have to know both the email of the customer and the reference of the command which is not a logical number suite like 1,2,3,4,... but a complex alphanumeric string the attacker can't guess.
getOrdersButtons()/getProductsButtons(): same problem that getOrderDetail() but not critical, no sensitive information are displayed. nothing to fix.
PrestaShop already includes a translation system, you cannot use your own.
Using your own translation system merchant will not be able to changes sentences.
Hi,
After a new review of the module, you can find the following tasks to do:
-> It will allow the community to know how their module is supposed to work and which functionalities are already offered by PrestaShop. If we allow every contributor or partner reinventing the wheel, we won't be able to give a model to use for the next modules.
-> We don't overload the shops with multiple systems which do exactly the same thing.
-> With the PrestaShop system, you can easily update the translations even if you can't access the PHP files. They are automatically generated by PrestaShop every time the changes are saved.
-> In your case, taking the step from your system to ours won't ask you a lot of time. For example in yousticeresolutionsystem.php (l.74):
$this->y_api->t('File a complaint')
would become
$this->l('File a complaint')
If you use it you will be able to add the template you want, without modifying the theme or the core.
During the last test, the value 'gb' was send to the function YousticeApi::setLanguage(...)
.
This value can be found from the back-office when the English (Great Britain) is downloaded.
An exception is thrown because this value doesn't exist in SDK/Helpers/LanguageCodes.php.
The use of $_SESSION is forbidden. You can use cookies only.
In /controllers/front/yrscontroller.php, the way you catch exceptions is incompatible with PHP 5.1 / 5.2.
catch(\Exception $e) {
should be
catch(Exception $e) {
Since PrestaShop should be fully compliant with PHP >= 5.2 the use of namespaces is forbidden.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.