Hikamarket ACL - view field but not edit

  • Posts: 112
  • Thank you received: 1
7 years 9 months ago #244764

-- 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

Please Log in or Create an account to join the conversation.

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
7 years 9 months ago #244767

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

<?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 } ?>
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,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
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.056 seconds
Powered by Kunena Forum