Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Best Way To Hide 'creation Date' Field From Vendors Rate Topic   - - - - -

 
  • buging
  • Member
  • Members
  • Join Date: 12-Jan 11
  • 332 posts

Posted 17 October 2016 - 12:40 PM #1

Hi,

I'm trying to hide the creation date field from vendors. I was able to do this using {if $auth.user_type=="A"}

{/if}, however i noticed that products created by vendors now have blank creation dates. Any advice on a different approach that will effectively hide this field from vendors or disallowing Vendors from editing this field?
 
TIA!
using 4.3.9
 


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19707 posts

Posted 17 October 2016 - 01:30 PM #2

You can replace:

                    <div class="control-group">
                        <label class="control-label" for="elm_date_holder">{__("creation_date")}:</label>
                        <div class="controls">
                            {include file="common/calendar.tpl" date_id="elm_date_holder" date_name="product_data[timestamp]" date_val=$product_data.timestamp|default:$smarty.const.TIME start_year=$settings.Company.company_start_year}
                        </div>
                    </div>

with

                    <div class="control-group{if $auth.user_type != 'A'} hidden{/if}">
                        <label class="control-label" for="elm_date_holder">{__("creation_date")}:</label>
                        <div class="controls">
                            {include file="common/calendar.tpl" date_id="elm_date_holder" date_name="product_data[timestamp]" date_val=$product_data.timestamp|default:$smarty.const.TIME start_year=$settings.Company.company_start_year}
                        </div>
                    </div>

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • buging
  • Member
  • Members
  • Join Date: 12-Jan 11
  • 332 posts

Posted 19 October 2016 - 12:46 PM #3

worked perfectly :)