News:

Looking for documentation? Take a look on our wiki

Main Menu

Admin manufacturer filtered BUG in edit product

Started by Studio 42, February 12, 2016, 21:41:52 PM

Previous topic - Next topic

Studio 42

HI all,
A customer reported me a BUG today,
When he search for a manufacturer and do not reset the form and edited a product, the list of manufacturer in the product form is filtered by it's last search (so he had only one manufacturer and not full list) !
I tested this and the bug is real ! :)

It's with VM 3, but i think this is in all VM release, it's so hard to have this case, that i think none discovered this before!

So i think the session var should not be used when you are in the product edit form and perhaps other views ?

Ghost

This is not a bug. All search variables in VM are now saved in session like in every Joomla component. This is very important for UX. Helps with product editing workflow, saves a lot of time.

Studio 42

I think, you don't understand.
When you search in the manufacturer view, the values are used in model for product view in admin.
This is a BUG!
If this was not a bug, then we use it same way for category too on edit a product and for customfields, ....

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

The edit product use   shopfunction::renderManufacturerList
and in this function
     static public function renderManufacturerList ($manufacturerId = 0, $multiple = FALSE, $name = 'virtuemart_manufacturer_id') {

                $manufacturerModel = VmModel::getModel ('manufacturer');

                $manufacturers = $manufacturerModel->getManufacturers (FALSE, TRUE);

If it work now ($view was added in latest release) or not,  i think using $manufacturerModel->getManufacturerDropdown is more safe and faster

And here another issue(checked in trunk, code have not change)
QuoteWarning: array_merge(): Argument #1 is not an array in XXX\administrator\components\com_virtuemart\models\shoppergroup.php on line 167
This is not always an array in line 167 and  return php warning errors.