- Posts: 1184
- Thank you received: 13
Display add to cart only to logged users
2 years 11 months ago #355551
by verzevoul
Display add to cart only to logged users was created by verzevoul
-- HikaShop version -- : 4.7.5
-- Joomla version -- : 3.10.12
Hello!
I have products without prices (free) and i want to display the "add to cart" button only to the registered users.
How do i do that?
Thank you
-- Joomla version -- : 3.10.12
Hello!
I have products without prices (free) and i want to display the "add to cart" button only to the registered users.
How do i do that?
Thank you
Please Log in or Create an account to join the conversation.
2 years 11 months ago - 2 years 11 months ago #355552
by nicolas
Replied by nicolas on topic Display add to cart only to logged users
Hi,
You could set a price of 0.0001 restricted to the registered user group. That way, with the "display add to cart button for free products" setting turned off, the add to cart button will appear only for registered users.
You could set a price of 0.0001 restricted to the registered user group. That way, with the "display add to cart button for free products" setting turned off, the add to cart button will appear only for registered users.
Last edit: 2 years 11 months ago by nicolas.
The following user(s) said Thank You: verzevoul
Please Log in or Create an account to join the conversation.
2 years 11 months ago #355627
by verzevoul
Replied by verzevoul on topic Display add to cart only to logged users
Hi!
I set the price as you suggested, turned on the "add to cart" button but noting changed.
Thank you
I set the price as you suggested, turned on the "add to cart" button but noting changed.
Thank you
Please Log in or Create an account to join the conversation.
2 years 11 months ago #355631
by nicolas
Replied by nicolas on topic Display add to cart only to logged users
Hi,
I found that product on your website: mixanismoi-syrtarion/odigoi-syrtarion-metal-box/product/3128-odigoi-syrtarion-metabox-12mm/category_pathway-2
I can see that this product has characteristics. If a variant has a price, the price of the main product will be ignored.
I can also see that the add to cart button is displayed even though no price is being displayed.
That should not happen with the "display add to cart button for free products" setting turned off.
Can you check that this setting is properly set ?
I found that product on your website: mixanismoi-syrtarion/odigoi-syrtarion-metal-box/product/3128-odigoi-syrtarion-metabox-12mm/category_pathway-2
I can see that this product has characteristics. If a variant has a price, the price of the main product will be ignored.
I can also see that the add to cart button is displayed even though no price is being displayed.
That should not happen with the "display add to cart button for free products" setting turned off.
Can you check that this setting is properly set ?
The following user(s) said Thank You: verzevoul
Please Log in or Create an account to join the conversation.
2 years 11 months ago #355867
by verzevoul
Replied by verzevoul on topic Display add to cart only to logged users
Hi,
The button worked like you suggested but after an import it doesn't work again.
All the prices are 0.000124 only for registered users and the "Display 'add to cart' button for free products" option is turned off.
But i don't know if it has something to do with the import.
I copied-paste to the text area tab.
I'm attaching the CSV file.
Thank you
The button worked like you suggested but after an import it doesn't work again.
All the prices are 0.000124 only for registered users and the "Display 'add to cart' button for free products" option is turned off.
But i don't know if it has something to do with the import.
I copied-paste to the text area tab.
I'm attaching the CSV file.
Thank you
Please Log in or Create an account to join the conversation.
2 years 11 months ago #355872
by nicolas
Replied by nicolas on topic Display add to cart only to logged users
Hi,
I don't know why it doesn't work.
I checked your website but everything looks good.
Could you provide a FTP access in order to look into it ?
I don't know why it doesn't work.
I checked your website but everything looks good.
Could you provide a FTP access in order to look into it ?
Please Log in or Create an account to join the conversation.
2 years 11 months ago #355876
by verzevoul
Replied by verzevoul on topic Display add to cart only to logged users
I sent you Nicolas!
Please Log in or Create an account to join the conversation.
2 years 11 months ago #355880
by nicolas
Replied by nicolas on topic Display add to cart only to logged users
Hi,
The problem comes from the price_access column of your prices.
For some reason, it has been changed from ,2, to just 2
This can be fixed with a small MySQL query:
However, I don't see how importing your CSV would lead to this since you don't have anything related to prices in there...
Are you sure that you used the CSV you provided in your message ?
The problem comes from the price_access column of your prices.
For some reason, it has been changed from ,2, to just 2
This can be fixed with a small MySQL query:
Code:
UPDATE #__hikashop_price SET price_access = ',2,' WHERE price_access='2'
However, I don't see how importing your CSV would lead to this since you don't have anything related to prices in there...
Are you sure that you used the CSV you provided in your message ?
The following user(s) said Thank You: verzevoul
Please Log in or Create an account to join the conversation.
2 years 11 months ago #355929
by verzevoul
Replied by verzevoul on topic Display add to cart only to logged users
Nicolas hi,
Another issue came up after the last import. Variants were deleted from several products and when i tried to readd them i got the message "Code already exists". I checked the database and the variants are there. I deleted one variant from the database and added the variant again in the backend of the product and it worked correctly. But this is weird. Any thoughts?
Thank you
Another issue came up after the last import. Variants were deleted from several products and when i tried to readd them i got the message "Code already exists". I checked the database and the variants are there. I deleted one variant from the database and added the variant again in the backend of the product and it worked correctly. But this is weird. Any thoughts?
Thank you
Please Log in or Create an account to join the conversation.
2 years 11 months ago #355930
by nicolas
Replied by nicolas on topic Display add to cart only to logged users
Hi,
This probably means that the CSV is wrong. For example, if the variant rows don't have the cells in the characteristics properly filled in.
This probably means that the CSV is wrong. For example, if the variant rows don't have the cells in the characteristics properly filled in.
Please Log in or Create an account to join the conversation.
Time to create page: 0.255 seconds