[BUG] Configuration get values form virtuemart.cfg not from DB

Started by servlet, September 04, 2013, 21:55:34 PM

Previous topic - Next topic

servlet

Configuration:
If I set 9 for field Default number of products in a row it is stored in DB. But when create new category it gets value form virtuemart.cfg which is 3 products per row by default.
If I manualy change the virtuemart.cfg and set 9 for Default number of products categories are fine.

The same is with Default number of categories in a row   
May be the same is with other settings in virtuemart.cfg and Configuration.
Он-лайн магазин за фототапети http://mishelfoster.com

Maxim Pishnyak

Quote from: servlet on September 04, 2013, 21:55:34 PM
But when create new category it gets value form virtuemart.cfg which is 3 products per row by default.
New category can't take values from DB as you mentioned in this thread name.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

servlet

Hello
I did not realize you confirm there is a bug or what?
Regards
Он-лайн магазин за фототапети http://mishelfoster.com

Maxim Pishnyak

Quote from: Maxim Pishnyak on September 04, 2013, 23:33:15 PM
Quote from: servlet on September 04, 2013, 21:55:34 PM
But when create new category it gets value form virtuemart.cfg which is 3 products per row by default.
New category can't take values from DB as you mentioned in this thread name.
Cos this category is new. This category didn't store any value in DB yet.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

servlet

And for what are the settings? If I want every new category to be with 5 products per row what can I do.
I dont want to change older categories. I want settings for new.
In DB config table (_virtuemart_configs) is stored 5 products per row but it is useless, cos new categories are with 3 products per row (gets value from virtuemart.cfg)
But virtuemart.cfg I can cange only with FTP.
This is a BUG. We set value in DB that we dont use. For what?

New categori settings:
Field: Number of Products per Row
Alt text: Leave it empty to use the default value set in the vm configuration

If I leave it empty category page dont display default value in VM DB table (_virtuemart_configs). It asign value form virtuemart.cfg which is editable through FTP
Он-лайн магазин за фототапети http://mishelfoster.com

Maxim Pishnyak

Quote from: servlet on September 05, 2013, 22:22:30 PM
If I want every new category to be with 5 products per row what can I do.
Put 5 in VM config BEFORE you add new category.
Quote from: servlet on September 05, 2013, 22:22:30 PM
But virtuemart.cfg I can cange only with FTP.
This is a BUG.
I disagree. Working with FTP IS the bug:
1. Use hosting service that is more flexible. Probably use 'apache' settings for your webserver (not fast-cgi).
2. Also you could archive your web site and extract it with the help of those little php file managers. After such procedure you'll be able to change files without FTP.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

servlet

Thank for replay.
I put 5 in VM config BEFORE you add new category, but new categories are with 3 product/categories per row
Он-лайн магазин за фототапети http://mishelfoster.com

Maxim Pishnyak

Quote from: servlet on September 08, 2013, 09:45:01 AM
I put 5 in VM config BEFORE you add new category, but new categories are with 3 product/categories per row
Are you sure that mentioned by you 'new' is actually new?
Your words in this upper quote is a bit contradictory with this lower quote
Quote from: servlet on September 04, 2013, 21:55:34 PM
But when create new category it gets value form virtuemart.cfg which is 3 products per row by default.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

servlet

Sorry, I have a mistake. New categories are OK. But old categories are not changed. This problem still exist.

Category options:
Field: Number of Products per Row
Alt text: Leave it empty to use the default value set in the vm configuration

Он-лайн магазин за фототапети http://mishelfoster.com

Milbo

The reason is that the old categories have stored the default. But our pattern in vm2 is not to store defaults, because
1. Then it is stored more than 1 time
2. Changing default would not affect the old categories.

For the media there is a button in the tools (deleting the default values of the thumbspath), but I did not create this for categories. hmmm
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

servlet

Thanks for replay Milbo
I saw table _virtuemart_categories -> products_per_row where is stored default value.
Hire is the idea:
If the value of products_per_row is empty (or 0)  get value from config table. If the value of products_per_row is different from empty (or > 0) get value from products_per_row
The button for deleting the default values for categories is needed too.
Он-лайн магазин за фототапети http://mishelfoster.com

Milbo

ehrm sorry, but, do you know what the word overwrite/override means and what it means to have a default value?

A default value IMPLIES that there is an override/overwrite. IT IS already that way your are describing.
Quote from: Milbo on September 08, 2013, 12:27:32 PM
The reason is that the old categories have stored the default. But our pattern in vm2 is not to store defaults

The reason is exactly why it works like
Quote from: servlet on September 08, 2013, 12:57:21 PM
Hire is the idea:
If the value of products_per_row is empty (or 0)  get value from config table. If the value of products_per_row is different from empty (or > 0) get value from products_per_row

Your problem is that you have wrong overrides in your categories, therefore we have the case  If the value of products_per_row is different from empty (or > 0) get value from products_per_row
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/