How i can hide add to cart button for non logged in visitors? Prestashop 1.6 - prestashop-1.6

I need to hide the button (add to cart) if user user logged out.
How i can hide add to cart button for non logged in visitors? Prestashop 1.6

It just can be done using custom theme.
You have to add new condition before display "add to cart" button to check customer group.

Related

How to hide Add to cart buttons for logged out users, but keep the variations visible in Woocommerce

Been looking for a code that hides the add to cart button for logged out users. Found codes, but they also remove the variations of the product, would like to keep them visible even for logged out users.

rails Nokogiri click all buttons with same tag

I am trying to scrap a web page that requires a click in order to display a phone number (https://homestars.com/on/toronto/electricians?page=1).
I can access and click on the 1st button using
browser.button(class: "company-search-contact__button").click
But I can't acess the following ones given that they all have the same tag.
I have not found any variations of the button() method that can be more specific.
The expression you are using would only click on first button. You need to select all buttons and click them one by one
page = Nokogiri::HTML(open("https://homestars.com/on/toronto/electricians?page=1"))
buttons = page.css('button.company-search-contact__button') #select all buttons on the page
buttons.each do |button| # for each button
button.click #click on the button
end

How do I unhide a section in the Umbraco admin panel?

I'm new to Umbraco - while playing and trying to explore from the admin area, I have hidden the Users and Members sections. Now, the Members and Users sections are not visible in the admin section. I am logged in using the master/admin account.
How I can unhide these sections? I want to bring them back and make them visible in the admin section.
In your backoffice, click left on the round circle with the head inside to get to your user settings.
From there you should be able to edit your profile settings by pressing the green "Edit" button.
In your profile settings, there should be a group called "sections". Verify that your "Users" and "Members" sections have a checkmark there.

Disable form fields and enable them after clicking on edit button

I have a form fields in which I am displaying data.
The values should be disabled and edit button should appear, after clicking on Edit button, the values should be enabled and user can edit the data and only save button should appear
How to achieve these two requirements in a single form in Asp.Net MVC4?
Use templates.
An ITEM TEMPLATE and then an EDIT TEMPLATE.
When the user presses the EDIT button, set the action to change to mode of the form to EDIT.

JSF2 render retraining old values

I am using JSF2 with #ViewScoped
I have table listing, cliking on row opens record in disabled='true mode'
2- ON the popup in disabled view button called 'Edit'
3- When user clicks upon edit button, all fields on the form which are disabled will become enabled.
Problem is in disabled mode it is fine but when user clicks upon edit button it start displaying few values from old record which was being clicked.
It is not happening every time but randomly when you start clicking.
I am not reloading any data when user clicks upon edit button instead I only make ajax call and set attrib val to true and on the bases of that I render model values and it dispalys enabled values.
is it cache problem or any thing else ???
help required.
In your bean set enableStatus =0;
and in edit button and all of your text fields, set disabled="#{bean.enableStatus==0}"
when u will click on edit then set enableStatus = 1 in your action method and reRender it.
You will get what you want....

Resources