- Posts: 112
- Thank you received: 1
Hikamarket ACL - view field but not edit
10 years 2 months ago #244764
by darrelluk
Hikamarket ACL - view field but not edit was created by darrelluk
-- HikaShop version -- : 2.6.3
-- HikaMarket version -- : 1.7.0
Hi,
I am looking to allow a vendor to see certain product fields from the front end, but not be allowed to change their value.
Is this done with the ACL?
An example is the product code. Its created in the back-end by us, needs to be viewed by the vendor at the front end, but must not be able to change its value.
Thx, Darrell
-- HikaMarket version -- : 1.7.0
Hi,
I am looking to allow a vendor to see certain product fields from the front end, but not be allowed to change their value.
Is this done with the ACL?
An example is the product code. Its created in the back-end by us, needs to be viewed by the vendor at the front end, but must not be able to change its value.
Thx, Darrell
Please Log in or Create an account to join the conversation.
10 years 2 months ago #244767
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Hikamarket ACL - view field but not edit
Hi,
The "product / edit" ACL are for only the edition.
We didn't add "product / show" ACLs because we though that it wasn't necessary and could be redundant.
But, even if there is no setting or ACL for that, you can force the display of some fields in the "productmarket / form" view.
Like it is already done for the product name
So you can perform an override of the view and make some fields visible (un read only) if the vendor do not have edition access.
Regards,
The "product / edit" ACL are for only the edition.
We didn't add "product / show" ACLs because we though that it wasn't necessary and could be redundant.
But, even if there is no setting or ACL for that, you can force the display of some fields in the "productmarket / form" view.
Like it is already done for the product name
Code:
<?php if(hikamarket::acl('product/edit/name')) { ?>
<dt class="hikamarket_product_name"><label><?php echo JText::_('HIKA_NAME'); ?></label></dt>
<dd class="hikamarket_product_name"><input type="text" name="data[product][product_name]" value="<?php echo $this->escape(@$this->product->product_name); ?>"/></dd>
<?php } else { ?>
<dt class="hikamarket_product_name"><label><?php echo JText::_('HIKA_NAME'); ?></label></dt>
<dd class="hikamarket_product_name"><?php echo @$this->product->product_name; ?></dd>
<?php } ?>
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: darrelluk
Please Log in or Create an account to join the conversation.
Moderators: Obsidev
Time to create page: 0.154 seconds