Which file?Qphoria wrote:And upgrade script is only needed for database changes. 1.5.1.1 does come with an upgrade script but if you are coming from 1.5.1 to 1.5.1.1 there was only 1 file changed.
I'm using OpenCart 1.5.1.3
Code: Select all
$this->cart->getProducts()
Can someone tell me how to get the length_class_id from a unit such as cm or mm? or to determine if an item in the cart is in mm or cm (based on the fact the length_class_id for that unit can change at any time and can't be trusted) ?
I gather it's available somehow, but I haven't found an example in the 1.5.1 release that uses it.
I think you have a fairly firm grasp on it. you'll need to query the db. I suppose you could say that none of your db information can be trusted because it can all be changed. In my experience you don't change your length classes much. If you are actually going to use them I would suggest you just don't change them.SuperJuice wrote:Can someone explain how I am to determine what unit a length type is by it's length_class_id? without querying the database? when accessing the item arrays returned back using:
I can't trust the length_class_id to be the same as what was shipped because at any stage a user can potentially modify / remove / add length classes, so the length_class_id is useless to me (and anyone else I would suggest) unless I can reference it by unit.Code: Select all
$this->cart->getProducts()
Can someone tell me how to get the length_class_id from a unit such as cm or mm? or to determine if an item in the cart is in mm or cm (based on the fact the length_class_id for that unit can change at any time and can't be trusted) ?
I gather it's available somehow, but I haven't found an example in the 1.5.1 release that uses it.
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
I am writing a modification that hundreds of people use, to suggest that I say "just don't change your length class settings because it will break the mod" is ridiculous, people modify settings all the time.Xsecrets wrote:I think you have a fairly firm grasp on it. you'll need to query the db. I suppose you could say that none of your db information can be trusted because it can all be changed. In my experience you don't change your length classes much. If you are actually going to use them I would suggest you just don't change them.SuperJuice wrote:Can someone explain how I am to determine what unit a length type is by it's length_class_id? without querying the database? when accessing the item arrays returned back using:
I can't trust the length_class_id to be the same as what was shipped because at any stage a user can potentially modify / remove / add length classes, so the length_class_id is useless to me (and anyone else I would suggest) unless I can reference it by unit.Code: Select all
$this->cart->getProducts()
Can someone tell me how to get the length_class_id from a unit such as cm or mm? or to determine if an item in the cart is in mm or cm (based on the fact the length_class_id for that unit can change at any time and can't be trusted) ?
I gather it's available somehow, but I haven't found an example in the 1.5.1 release that uses it.
I don't see the reason that the unit title was removed from the array when it was available in 1.5.0.5? Now you want a shipping module to query the database directly to request something that should be exposed as part of the items array? That is subverting the entire plugin/module API to get a piece of basic information about a product, and I am only the first to complain of many I am sure.. switching to referencing by ID gained nothing.
Is it finally possible to upgrade from 1.5.0.5 to 1.5.1.x ?
We have spent all day trying to upgrade using 1.5.1.1 upgrade script on our 1.5.0.5 installation only to find that all modules have disappeared and will only work if reinstalled, which is kinda pain in the ass, as we might as well have simply installed a fresh 1.5.1.1 installation.
Also saw somewhere that upgrading from 1.5.0.5 to 1.5.1 was not possible. I think if its not possible to upgrade, its better not to release a new version at that time as all it does is piss off your customers.. If you cant upgrade your live store from one version to another, then that new version is only useful to new customers so no one at the point of release.. I completely understand that upgrade script can not be released on the same day as a new major version of OpenCart like it was from 1.4 to 1.5, but to say upgrading from 1.5.0.5 to 1.5.1 is not possible is just ridiculous.
Hope that instead of slagging me off, you will think about it and improve..
Thank you,
Igo
* No OpenCart support companies would make money because upgrading would be too easy
* For-money developers wouldn't make money re-selling the same mods when version updates broke them
I have ended up adding database queries to a shipping module just to make it work with 1.5.1.1.. as I know from experience that any suggestion that the developers have made an error of judgement is treated with contempt.
Thanks for your help and support.
obviously you know how db queries work, so you know well what is gained. You eliminate an extra subquery to pull the actual name. Regardless if you go in the backend and change your length classes it's going to change the results no mater if you query it in the main query or a separate query. I don't really see the problem. Even if you have millions of people using it how often do you need to change your length classes. That is something that should be set one time on store setup and never touched again.SuperJuice wrote:switching to referencing by ID gained nothing.
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
I noticed you have twice this field in products.php, row 23, 24 version 1.5.1.1
'model' => $query->row['model'],
'model' => $query->row['model'],
Another things is that my field cost for the product is gone missing, why?
One more thing, I have filecompared all changes from v1.5.1.0 to v1.5.1.1 and so far only 7 files changed.
Cheers,
The problem is people _can_ change it, so you need to account for that. As a programmer i'd expect you to have a greater interest in a solution, and less of a "people shouldn't do that, it's the user's fault!" attitude.Xsecrets wrote:obviously you know how db queries work, so you know well what is gained. You eliminate an extra subquery to pull the actual name. Regardless if you go in the backend and change your length classes it's going to change the results no mater if you query it in the main query or a separate query. I don't really see the problem. Even if you have millions of people using it how often do you need to change your length classes. That is something that should be set one time on store setup and never touched again.SuperJuice wrote:switching to referencing by ID gained nothing.
You eliminate an extra subquery at your end.. so that module developers have to write it into their code at their end? what a great saving. It's not even a subquery, it's a join to a table with 3 fields, and inserting a field in an array. The time saving will be in the sub ms.
So now that I have had to query the DB from the module, I now depend on the database structure not changing.. and we all know database changes never happen in OpenCart... right?
Obviously you know the point of creating standardised application API's so module developers are abstracted from the 'heavy lifting'.. and you surely understand the benefits of retaining API compatibility across versions? So why doesn't OpenCart take any interest in doing this?
well I don't actually write opencart you'll have to talk to Daniel about that. Sure it doesn't save much, but it doesn't really matter either. So you have the value in the array that doesn't change the fact that a user can change it and then the next time you pull that query it will be different, so I don't see what you are on about. Weather it's pulled in the original array or later on doesn't change the fact that users can change it, as a matter of fact it doesn't change anything other than in the few ms it will take you to query the db again a user could change it then which is highly unlikely.SuperJuice wrote:
The problem is people _can_ change it, so you need to account for that. As a programmer i'd expect you to have a greater interest in a solution, and less of a "people shouldn't do that, it's the user's fault!" attitude.
You eliminate an extra subquery at your end.. so that module developers have to write it into their code at their end? what a great saving. It's not even a subquery, it's a join to a table with 3 fields, and inserting a field in an array. The time saving will be in the sub ms.
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
Yes that is the process... hardly the same as reinstalling.. you just have to reinstall the modules.. not the shipping, payments, orders, customers, products, etc. The upgrade script comes with 1.5.1.1lvcoded wrote:Guys,
Is it finally possible to upgrade from 1.5.0.5 to 1.5.1.x ?
We have spent all day trying to upgrade using 1.5.1.1 upgrade script on our 1.5.0.5 installation only to find that all modules have disappeared and will only work if reinstalled, which is kinda pain in the ass, as we might as well have simply installed a fresh 1.5.1.1 installation.
auto complate in products (option+attributes) ..not works whit UTF8 chars...
thanks
توسعه اپن کارت
طراحی نرم افزارهای مبتنی بر اپن کارت - امنیت/توسعه اختصاصی/خدمات سئو/ سیستم تیکت و فروش بلیط/مدیر سمینار و همایش
اتصال اپن کارت به نرم افزارهای انبار داری و انواع CRM و ERP و دستگاه پوز و پرینتر
https://www.imahmoudi.ir
https://www.opencart.com/index.php?rout ... @gmail.com
amertad wrote:hi .
auto complate in products (option+attributes) ..not works whit UTF8 chars...
thanks
which utf-8 characters?
i just tested it with ä and it works fine. are you typing the name of the global attributes?
OpenCart®
Project Owner & Developer.
you only need to uninstall then click install on extension > modules. hardly the end of the world when you get to keep all you product, customer, order data.lvcoded wrote:Guys,
Is it finally possible to upgrade from 1.5.0.5 to 1.5.1.x ?
We have spent all day trying to upgrade using 1.5.1.1 upgrade script on our 1.5.0.5 installation only to find that all modules have disappeared and will only work if reinstalled, which is kinda pain in the ass, as we might as well have simply installed a fresh 1.5.1.1 installation.
Also saw somewhere that upgrading from 1.5.0.5 to 1.5.1 was not possible. I think if its not possible to upgrade, its better not to release a new version at that time as all it does is piss off your customers.. If you cant upgrade your live store from one version to another, then that new version is only useful to new customers so no one at the point of release.. I completely understand that upgrade script can not be released on the same day as a new major version of OpenCart like it was from 1.4 to 1.5, but to say upgrading from 1.5.0.5 to 1.5.1 is not possible is just ridiculous.
Hope that instead of slagging me off, you will think about it and improve..
Thank you,
Igo
you don;t have to reinstall shipping or payment extensions.
OpenCart®
Project Owner & Developer.
Daniel wrote:amertad wrote:hi .
auto complate in products (option+attributes) ..not works whit UTF8 chars...
thanks
which utf-8 characters?
i just tested it with ä and it works fine. are you typing the name of the global attributes?
thanx
توسعه اپن کارت
طراحی نرم افزارهای مبتنی بر اپن کارت - امنیت/توسعه اختصاصی/خدمات سئو/ سیستم تیکت و فروش بلیط/مدیر سمینار و همایش
اتصال اپن کارت به نرم افزارهای انبار داری و انواع CRM و ERP و دستگاه پوز و پرینتر
https://www.imahmoudi.ir
https://www.opencart.com/index.php?rout ... @gmail.com
Thanks again for all your hard work!
Users browsing this forum: No registered users and 95 guests