Skip to main content

Hikamarket ACL - view field but not edit

More
10 years 2 months ago #244764 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

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

More
10 years 2 months ago #244767 by Jerome
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
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 } ?>
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.
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
Powered by Kunena Forum