Call to Action Button

A Call to Action (CTA) button is a powerful tool to drive user engagement and encourage specific actions, such as redirecting users to the product detail page (PDP). Follow these simple steps to integrate a CTA button, "View Product," within product cards in your Shopify store using Findify's new Shopify app built with Liquid.

Integration Steps

Step 1: Create a New Asset

  1. Navigate to Theme → Edit Code → Assets in your Shopify admin panel.

  2. Add a new asset and name it accordingly (e.g., customCTA.js).

  3. Paste the provided JavaScript function into the newly created asset.

function customCTAFunction() {
	console.log('CTA Action Fired')
}

Step 2: Include Script in Theme Layout

  1. Open the theme.liquid file in your Shopify theme editor.

  2. Paste the following script immediately after the <head> tag to include the custom JavaScript file.

<head>
	...
	<script src="{{ 'yourAssetName.js' | asset_url }}" defer="defer"></script>
</head>

Step 3: Add Button to Product Card

  1. Locate the findify-product.liquid file in your Shopify theme editor.

  2. Insert the following HTML code snippet within the product card section to add the CTA button.

<div>
	<a href={{ product_url }}>
		// ... other code 
	</a>
	<button onclick="addToCart({{ id }}, {{  selected_variant_id }})" >
		Add to cart
	</button>
</div>

By following these straightforward steps, you can effortlessly integrate a Call to Action button within product cards in your Shopify store. Enhance user engagement and encourage users to explore product details with this simple yet effective feature.

For further assistance or inquiries, feel free to contact us on [email protected].