Skip to product information
1 of 1
Published:2023.10.30

[Dawn] Example of setting to prevent adding items to cart on product details screen if you are not logged in with Shopify theme "Dawn"

[Dawn] Example of setting to prevent adding items to cart on product details screen if you are not logged in with Shopify theme "Dawn"

Applications

  • Product information management and editing

How to implement

  • LIQUID
  • HTML/CSS
  • Javascript
View full details

This is a setting example for Shopify to prevent specific products specified by tags from being added to the cart if the user is not logged in (registered). This is a simple way to edit this from the theme editor, but you can also embed the code directly in main-cart.liquid.


Example of setting to prevent adding items to cart on the product details screen if you are not logged in with the theme "Dawn"


[Setup Procedure] Add the "Customized Liquid" block to "Consumption Information" and insert the code


[How to use] For products that require login to purchase, add the tag specified in the code in the "Settings" section.


After making a purchase (all items are ¥0), you will be able to view the sample code.

If you have already made a purchase, please login here.

Sample Codes

Test Theme :Dawn/Rise 15.2.0

Add the "Customized Liquid" block to "Product Information" and insert the code

Related Post