News:

Looking for documentation? Take a look on our wiki

Main Menu

The publication on the "inventory" page in the front-end does not work.

Started by AnSit, April 11, 2020, 10:48:41 AM

Previous topic - Next topic

AnSit

If you enter the administration mode from the front end, the product publishing function does not work on the "inventory" page. But the function of publishing products works well on the page "products".

I really need the publishing function to work on the "inventory" page, because the seller must not see the page "products" and change any of their properties other than publication.

This is about the same problem as described in the topic: http://forum.virtuemart.net/index.php?topic=144131.0

Tell me, please, where in the code can I fix this error?

pinochico

Ansit:

It's not error :)
You need add new function for admin convenience in FE.

QuoteAnd why is it that you suddenly cannot see the inventory page from the frontend?

Is the fact. And VirtueMart is the open source. Is the fact too - then you can developing your custom solution, if you need, but after update all custom solution will be destroyed.
My all clients and me don't use FE for administration. Is the fact too and we are very happy :)

Find code inside view for admin inventory page  and change the code:
administrator\components\com_virtuemart\views\inventory\view.html.php
administrator/components/com_virtuemart/views/inventory/tmpl/default.php
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

AnSit

"It's not error :)"
Yes, I agree this is not a mistake, but this is a defect.

"You need add new function for admin convenience in FE."
No, you do not need to add any function - you just need to fix this defect.

"My all clients and me don't use FE for administration. Is the fact too and we are very happy :)"
Almost all of my clients use FE for administration. And we are very glad that VM allows you to do this. Just sometimes there are small errors that developers quickly and successfully fix.

The files you specify do not have the code you need at all. But thank you for trying to help!

Tell me, please, who knows how and where to fix the problem I found and indicated?

jenkinhill

Is this a follow-on from http://forum.virtuemart.net/index.php?topic=144131  ?

I would never manage inventory from the front end, and as you are the only one to mention this (ever!) it is unlikely to be on the development radar. I've not used it, but I wonder if Daycount's inventory manager works from the FE - https://www.daycounts.com/virtuemart-add-ons/advanced-inventory
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

AnSit

QuoteIs this a follow-on from
Yes, of course, this is an addition to this topic. But I did not continue it, because this already concerns another problem, although it is also connected with FE.

QuoteI would never manage inventory from the front end
Of course, you would not manage, since you think as an administrator and a developer, and not as a manager with limited tasks.

My managers do not need to see too much. They even ask me to specifically show for them only what they need - they don't even want to see the rest. Excess to them interferes with work.
And I agree with them. All that a manager needs can be opened thanks to the VM rights, which are very flexibly configured. But since there is a publishing function on the inventory page, then it should work like on any other page.

Please help me find and fix this problem in the code. Moreover, you make it clear that developers will not want to fix this.

Studio 42

Ansit, i dont know if someone want to fix this. You are the first reporting this problem.

AH

Probably because very few people ever use this page and function on it

If you need help get a gold membership
Regards
A

Joomla 4.4.5
php 8.1

AnSit

Thanks for connecting somehow to help!
Wow, so it turns out that even developers really don't want to fix such a minor problem ?! (((

Very sorry! After all, the publication function is on this page and the rights to publish are and are working and nobody canceled or disabled editing from the frontend. Well, the publishing function on any page should work properly.

Okay, if really none of you professional professionals and VM developers want to fix this imperfection, then tell me, please, at least in what file is this function of publishing described so that I can try to figure out the code myself and fix this problem?

Studio 42

AnSit, we are all help for free and  many hours.
Do you work for free ?
This is a open source project, if this is hurry for you, then fix it and send the code back.

AnSit

Well what are you! No rush!

I personally work both for a fee and for free.

I just saw that many professionals responded right away and at first I wanted to know if it would ever be fixed by anyone. If this will not be fixed and it is not interesting to anyone, just besides me, then I thought that it was probably not so difficult to just tell me in which file to find this function for self-correction. I'm just too poorly versed in PHP. But if it turned out to be not simple and not fast, then I am ready to expect an answer from you as much as it takes.

So that no one would think: I really appreciate your work, time and any of your help!

Studio 42

I mean that the inventory controller/modle have not the setting to publish products.
So you need to add it in the model, but i'm not sure that the value send in the form is right, so it need perhaps some convertion.
But the big question is : Does it work in the back-end inventory view ?

AnSit

Thank you for your responsiveness and desire to help!
Maybe I didn't explain well because of my poor knowledge of English. I will try then to explain with the images.

QuoteBut the big question is : Does it work in the back-end inventory view ?
The publish button works in the backend when I use the administrator account. As a manager, I can't verify this, because he has publisher rights and cannot enter the backend. But the manager doesn't really need access to the backend, as I wrote above.

Here, look, please, in the frontend on the inventory page there are buttons for publishing and unpublishing.
But when you select the product and click on the publish button, an error pops up. As if the user manager is not enough rights. But in fact, he has rights to publish, because on the product page, this user with these rights can publish the product without problems and errors.

So I just would like to be helped or suggested to me how to fix the code so that publication also works on the inventory page.

GJC Web Design

have u checked your VM permissions?

the default change state for manager is Not Allowed
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

AnSit

Yes, yes, of course!
I gave all the necessary rights to the manager (he is from the group of publishers). And I also gave him permission for this action.
And as a result, on the product page (if I open it for the manager), the publish button works and on the inventory page does not work. But you need to fix the publication function on the inventory page, because this manager needs to see only the inventory page.

Studio 42

When you are an administrator, you have the right to do all, so the Joomla permission about publish cannot be a probem for an admin.
When you are a manager, then the ACL is checked and publish in inventory try to find the right ACL, but i mean that this ACL does not exist, so you cannot change it (in your site or back-end)
Check this file
/administrator/components/com_virtuemart/access.xml
and add a line in any <section name="component">
<action name="vm.inventory.edit.state" title="COM_VM_INVENTORY_EDITSTATE" description="COM_VM_INVENTORY_EDITSTATE_TIP" />