Giter Club home page Giter Club logo

opencart-overclocked's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opencart-overclocked's Issues

[1.6.5.0] USPS rates

USPS shipping rates need to be aligned with OC2.0
Priority Mail Express => Express Mail

[1.7.2] Error at language creation

At new language creation (route=localisation/language/insert), I have:

Notice: Error: Table 'opencart_oce_172.oc_custom_field_description' doesn't exist
Error No: 1146
SELECT * FROM oc_custom_field_description WHERE language_id = '1' in D:\Wamp\www\OPENCART-OCE-1.7.2\upload\system\database\mysqli.php on line 49

[1.7.0] Category name not displayed in product detail form

In tab "Links" of product details, the category box has incorrect display.
OPENCART-OCE-1.7.0\upload\admin\controller\catalog\product.php
Line 1146 should be with parenthesis:
'name' => ($category_info['path'] ? $category_info['path'] . ' > ' : '') . $category_info['name']

[1.8.1] Library directory needs revision.

I have gone through some files (country, cart) in the library directory and compared with OC2.3.
There are many changes and corrections to do there.
Some structures are completely different but better rewritten in OC2 version.
Check and revision are needed there.

[1.7.2] About "Location" module

In Admin, on the module page, there is a "Location" module.
I dont see where its settings are used and the utility of this module ???
I introduced some lines and checked Front pages but nothing visible...
Do not confuse with localization / location.
No trace in old OC versions. What is it for ??

[1.7.2] New classes broke extensions usage

I would like to point out that in forms with an image field and/or multiple select (select all / unselect)
the new code introduced with 1.7.2 is not compatible with old versions when writing an extension.
If someone adopts the new code with class=... in his extension, this will not display if extension used with version <= 1.7.1
Developper will have to make a choice, continue with old code and text links (compatible) or use graphical 1.7.2 buttons (incompatible with <=1.7.1).

<a onclick="image_upload('image', 'thumb');" class="button-browse"></a><a onclick="$('#thumb').attr('src', '<?php echo $no_image; ?>'); $('#image').attr('value', '');" class="button-recycle"></a>

Meta Tag Description in Admin

Hi in the process of moving my store and have found that when I place a Meta Tag Description in the categories and products page save then re-open the page the Meta Tag Description disappears. thought it might be and error in my installation so created a a fresh install with the data that came with the package with no changes made and the same issue is present.
Peter

Nasty "eval()" function in Install index.php

I've done a lot of code clean-up lately and fixed many irregularities but ...

One critical still remain, in the "install/index.php", where an"evil" eval(); function is still being used. It's only the install folder, so it won't affect the production store, but I would love to get rid of it!

Let me know your thoughts on how to replace this function with a safer one.

Missing title attribute for icons

Missing title=" " attributes on mouseover for Mail Log, Quote Log, Error Log and Seo Url Manager icons.
icons

The same applies for Add to Wish List and View Item icons.
icon

And many others in the Admin section.
img

It's not very user friendly, as you don't know what those icons do, before clicking them.
v1.10.2

Paypal Express

Hi I'm getting the following error when using Paypal Express:
"Parse error: syntax error, unexpected 'return' (T_RETURN) in C:\wamp\www\overclocked\catalog\controller\payment\pp_express.php on line 1954" I got this on the previous version as well and just over wrote the pp_express.php file with the one from OC 1.5 but it's a dirty hack that I don't like doing.

[1.7.1] Select all checkboxes

In OPENCART-OCE-1.7.1\upload\admin\view\template\catalog\product_form.tpl, you have a double javascript select_all() which is bugged and doesnt work.

<script type="text/javascript"><!--
var formblockA;
var forminputA;

formblockA = document.getElementById('store_ids');
forminputA = formblockA.getElementsByTagName('input');

function select_all(name, value) {
    for (i = 0; i < forminputA.length; i++) {
        var regex = new RegExp(name, "i");
        if (regex.test(forminputA[i].getAttribute('name'))) {
            if (value == '1') {
                forminputA[i].checked = true;
            } else {
                forminputA[i].checked = false;
            }
        }
    }
}

var formblockB;
var forminputB;

formblockB = document.getElementById('location_ids');
forminputB = formblockB.getElementsByTagName('input');

function select_all(name, value) {
    for (i = 0; i < forminputB.length; i++) {
        var regex = new RegExp(name, "i");
        if (regex.test(forminputB[i].getAttribute('name'))) {
            if (value == '1') {
                forminputB[i].checked = true;
            } else {
                forminputB[i].checked = false;
            }
        }
    }
}
//--></script>

I suggest to replace each call with the simple jquery code in 1 line used in OC2.0:

<a onclick="$(this).parent().find(':checkbox').prop('checked', true);"><?php echo $text_select_all; ?></a> / <a onclick="$(this).parent().find(':checkbox').prop('checked', false);"><?php echo $text_unselect_all; ?></a></div>

Font Awesome

Idea: Installing font awesome 4.4 in standart passed by css in the header to approach oc2.x design.

[1.7.4] EU taxes works only in English

As EU taxes installs its own table 'eucountry_description', it is not touched when adding/removing a new language, so that it displays no EU country (empty result) when admin is in another language than English.
Should it be part if the core ? I see it rather as an extension, or you must rewite it.

[1.7.0.RC2] Tabs making right shift

Something leaving since a long time (same in OC): when many tabs present, so that a wrap is done at the right margin, the next content is shifted right to the last tab.
As im not a css expert, something to do with "floating" perhaps ?
Particulary in Products->Edit
1 7 0 rc2_shift

[1.7.2] Manufacturer names (2)

Addendum to issue #34:
You must also add the corresponding line for 'manufacturer_description' in deleteLangage() on order to clean table when removing a language.

[1.7.0] Missing payment modes

Comparing with OC2.0.3.1, few payment methods are absent (or OC added some between).
Need some rework in that directory.

Error in SQL catalog/model/account/recurring.php

PHP Fatal error: Uncaught exception 'Exception' with message 'Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or LEFT JOIN oc_order o ON (or.order_id = o.order_id) WHERE o.customer_id = '0' at line 1
Error No: 1064

*The error can be fixed by changing line 92 from: *

    $query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "order_recurring or LEFT JOIN `" . DB_PREFIX . "order` o ON (or.order_id = o.order_id) WHERE o.customer_id = '" . (int)$this->customer->getId() . "'");

*to *

    $query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "order_recurring orc LEFT JOIN `" . DB_PREFIX . "order` o ON (orc.order_id = o.order_id) WHERE o.customer_id = '" . (int)$this->customer->getId() . "'");

Errors when trying to view the Cart

Please note that on a fresh install (all modules active) I got this random error when trying to view the Cart.
err2
err

2017-12-11 12:57:25 - PHP Warning: Division by zero in C:\Bitnami\wampstack-7.0.22-1\apache2\htdocs\cart\catalog\controller\checkout\cart.php on line 136

2017-12-11 12:57:48 - PHP Warning: Division by zero in C:\Bitnami\wampstack-7.0.22-1\apache2\htdocs\cart\catalog\controller\checkout\checkout_one_page.php on line 216

Testing on v1.10.2

[1.7.2] Manufacturer names

Due to the splitting of manufacturer name in a new table 'manufacturer_description', the manufacturer list do not display any manufacturer if admin is in another language than english. In french, i get no results but in english i got the 6 demo manufacturers. At least, the english names should be displayed by default in list entries if no correspondance exists in the foreign language.

Database cache inconsistency object/array

Database query returns object but when fetched from cache it returns array.

Throws error: Trying to get property of non-object when loading from cache.

E.g simple test

$query = "SELECT * FROM " . DB_PREFIX . "product LIMIT 10";
$queryName = md5($query);
$result = $this->cache->get($queryName);
if(!$result){
	$result = $this->db->query($query);
	$this->cache->set($queryName, $result);
}

var_dump($result);
exit;

First run will return object:

object(stdClass)[513]
public 'num_rows' => int 10
public 'row' =>

Second load from cache :

array (size=3)
'num_rows' => int 10
'row' =>

It's caused from json_decode 2nd param being true in library/cache.php

assoc
When TRUE, returned objects will be converted into associative arrays.

http://php.net/manual/en/function.json-decode.php

[1.7.6] Order payment details not displayed

I think there is a problem in admin when viewing payment details of an order.
I traced this problem back to OC 1.5.6
When using a payment method, the details do not display the infos of this method.
Think the problem is in \upload\admin\controller\sale\order.php, line 1800; function info()

if ($this->hasAction('payment/' . $order_info['payment_code'] . '/orderAction') == true) {
    $this->data['payment_action'] = $this->getChild('payment/' . $order_info['payment_code'] . '/orderAction');
} else {
    $this->data['payment_action'] = '';
}

There is no method "orderAction" in payment modules but an "order" one instead.
And i didnt find where these methods "order" are used.
So think it should be:

if ($this->hasAction('payment/' . $order_info['payment_code'] . '/order') == true) {
    $this->data['payment_action'] = $this->getChild('payment/' . $order_info['payment_code'] . '/order');
} else {
    $this->data['payment_action'] = '';
}

[1.7.0.RC2] Checkbox for demo products

Something very useful would be to have a checkbox at install for not installing demo products (like in Zencart or Alegrocart) so that one can start a new empty site.

[1.7.1] Group name

In system/library/user.php, it had ben added the group ID of the current user.
So why not set the group name at the same time with a function like getGroupName() ?

[1.7.0.RC1] Dashboard resume

For nice aligment in all langages, I suggest changing the dashboard resume
1 7 0 rc1_dashboard
to something like Arastta (but with icon at left, then 2 lines):
arastta_dashboard

[1.8.0.beta] Remarks about Affiliates

  1. You have put setting 'config_login_attempts' in affiliates header, but in oc2.x it is common with customers and put in 'accounts'

  2. As 'error' is an array, it is syntaxly best to write:

return empty($this->error);

than negate like

if (!$this->error) {
return true;
} else {
return false;
}
  1. As oc1.5x, you always use
$this->language->load(...)

but the good form is

$this->load->language(...)
$this->load->model(...)

(the loader loads a language file)

  1. The method 'addActivity' is correct but I prefer like oc2.x because passing an array to the method is best when extensions add some parameters here. You simply add entries inside the array and dont have to add a list of functions parameters. So i think it is bad as you have modified.
-           $this->model_affiliate_activity->addActivity('edit', $activity_data);
+               $this->model_affiliate_activity->addActivity($affiliate_id, 'edit', $affiliate_name);

Fatal Error on installation from master

This exception is being raised on install. Sorry, I don't have time to debug right now, so just filing the issue here.

Exception: Error: Key column 'supplier_address_id' doesn't exist in table
Error No: 1072
CREATE TABLE oc_supplier_address ( address_id int(11) NOT NULL AUTO_INCREMENT, supplier_id int(11) NOT NULL, company varchar(32) NOT NULL, address_1 varchar(128) NOT NULL, address_2 varchar(128) NOT NULL, city varchar(128) NOT NULL, postcode varchar(10) NOT NULL, country_id int(11) NOT NULL DEFAULT '0', zone_id int(11) NOT NULL DEFAULT '0', PRIMARY KEY (supplier_address_id), KEY supplier_id (supplier_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; in /var/www/projects/test/_test/OpenCart-Overclocked/system/database/mysqli.php on line 39

Call Stack

1 0.0008 273312 {main}( ) .../index.php:0
2 0.0288 3163368 Front->dispatch( ) .../index.php:92
3 0.0288 3163608 Front->execute( ) .../front.php:28
4 0.0297 3300368 call_user_func_array:{/var/www/projects/test/_test/OpenCart-Overclocked/system/engine/front.php:41} ( ) .../front.php:41
5 0.0297 3305312 ControllerStep3->index( ) .../front.php:41
6 0.0318 3347904 ModelInstall->database( ) .../step_3.php:9
7 4.1250 5319008 DB->query( ) .../install.php:37
8 4.1250 5319144 DBMySQLi->query( ) .../db.php:20

[1.7.0] Zones filter not good

The problem:
After installing french regions (country_code 73) and departments (country_code 74), if i filter on "France" (73) i get the correct result BUT the pagination counts ALL zones "France" + "France Metropolitan". You can even try filter with "AL", the result is empty but pagination shows 5 tabs.
Query in getTotalZonesByCountryNames() is not good, it takes "France%" or "AL%" so adds all.
The javascript filter() should use country_id and name.
I have checked only this one and not others.

snap1

NOTE: It is stupid to do a DB query for the total as each $query has num_rows which IS the total. Just return the whole $query object to the controller and extract rows and total here. You can even pass a mysql error and true/false for failure like this.

Long-term Plan for OpenCart Overclocked (question)

Hi Philippe,

I'm watching OpenCart Overclocked for a while and I like very much your attitude and commitment to the project. I am willing to participate in this fork but I'm more interested in solving architecture problems than adding new features. That's why I have some general questions before taking time to create pull requests.

Being theme and extensions developer, I have broad experience in OpenCart. It wouldn't be unfair to say that I just know it inside out. There are many things that bother me as a developer, mostly about constant violation of the DRY principle. The most striking example is with the way the language variables are assigned to the templates, with endless repetition of

$this->data['foo'] = $this->language->get('foo');

I know that the OpenCart's philosophy is being simple and not trying to make JAVA from PHP, like Magento does, but there are many things that can be improved.

I would like to know a bit more about your idea behind Overclocked:

  • Do you strive to adhere as much as possible to the OpenCart way without changing things that could eventually break some third party extensions, i.e. without improving the underlying platform ?
  • You may also want to keep maximum OC compatibility in Overclocked 1.x branch and create 2.x branch with some backwards compatibility breaks?
  • Or you would like to improve the platform without introducing BC breaks, so that only new features/modules will take advantage from the improvements. For example we can create a better method for assigning language variables, but make only new Overclocked modules (Custom Menu System, Custom Footer System etc.) use it.

I would propose some things based on your answers of my questions. If anything is unclear, let me know.

Thank you for your time.
Regards,
Stoyan

[1.7.2] About revision numbering

Would not it be better to have:
define('REVISION', '20151214');
or
define('RELEASE_DATE', '20151214');
without separation so that we can make a test directly like "if (revision < YYYYMMMDDD) then ..."
and adapt extensions code to your changes betweeen versions ?

[1.7.0] About sort order in columns.

Often in the header of .tpl files, for sorting you write something like:

<td class="left"><?php if ($sort == 'cd1.name') { ?>
  <a href="<?php echo $sort_name; ?>" class="<?php echo strtolower($order); ?>"><?php echo $column_name; ?></a>
  <?php } else { ?>
  <a href="<?php echo $sort_name; ?>"><?php echo $column_name; ?>&nbsp;&nbsp;<img src="view/image/asc.png" alt="" /></a>
<?php } ?></td>

But the asc.png is useless here as it is done by the class="asc" or class="desc".
Like in the Windows Explorer, there is only one column which shows the current sort in use with the triangle. No need to display triangles on the other columns which is confusing.
Good code is:

<td class="left"><?php if ($sort == 'cd1.name') { ?>
  <a href="<?php echo $sort_name; ?>" class="<?php echo strtolower($order); ?>"><?php echo $column_name; ?></a>
  <?php } else { ?>
  <a href="<?php echo $sort_name; ?>"><?php echo $column_name; ?></a>
<?php } ?></td>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.