Home Forums Themes Support Claue Shop now button not displaying Right side drawer

Viewing 3 reply threads
  • Author
    Posts
    • #7294

      Hello,

      Every time I added an item to the cart on a product page a drawer would come out on the right side out the page like on image 1, telling the customer to go to cart or go to checkout.

      I dont know why but now that’s not happening instead I’m getting a message at the bottom of the page that says that the item has been added to the cart, image 2.

      How can I activate it again so that when people click on buy the product the drawer shows up again.

      Thank you!

      Attachments:
      You must be logged in to view attached files.
    • #7307

      Hi

      This issue because you added below code in Theme Option > General Layout > Custom JS

      `post->ID ), ‘single-post-thumbnail’ )[0];
      $ItemId = $product->id;
      $Title = $product-> get_title();
      $ProductUrl = “http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]”;
      $Price = $product->get_price();
      $RegularPrice = $product->get_regular_price();
      $DiscountAmount = $RegularPrice – $Price;
      $terms = get_terms( ‘product_tag’ );
      ?>’

      This section doesn’t support PHP code, please remove it

      Best regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #7338

      Hi Harry, thank you for your response.

      I need to add this code to the website to track users for retargeting campaigns

      https://help.klaviyo.com/hc/en-us/articles/115005255808-Integrate-with-WooCommerce

      Which is the combination of php and js code I added in the custom JS box, where can I add that tracking code?

      This one

      <?php
      $ImageUrl = wp_get_attachment_image_src( get_post_thumbnail_id( $loop->post->ID ), ‘single-post-thumbnail’ )[0];
      $ItemId = $product->id;
      $Title = $product-> get_title();
      $ProductUrl = “http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]&#8221;;
      $Price = $product->get_price();
      $RegularPrice = $product->get_regular_price();
      $DiscountAmount = $RegularPrice – $Price;
      $terms = get_terms( ‘product_tag’ );
      ?>

      <script>
      var Title = “<?php echo $Title; ?>”;
      var ItemId = “<?php echo $ItemId; ?>”;
      var ImageUrl = “<?php echo $ImageUrl; ?>”;
      var ProductUrl = “<?php echo $ProductUrl; ?>”;
      var Price = “<?php echo $Price; ?>”;
      var DiscountAmount = “<?php echo $DiscountAmount; ?>”;
      var RegularPrice = “<?php echo $RegularPrice; ?>”;
      var _learnq = _learnq || [];

      _learnq.push([‘track’, ‘Viewed Product’, {
      Title: Title,
      ItemId: ItemId,
      ImageUrl: ImageUrl,
      Url: ProductUrl,
      Metadata: {
      Price: Price,
      DiscountAmount: DiscountAmount,
      RegularPrice: RegularPrice
      }
      }]);
      </script>

    • #7341

      Hi,

      You need copy file content-single-product.php from claue > core > Libraries > vendors > woocommerce > template to claue-child > woocommerce and add you code in this file.

      Best regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

Viewing 3 reply threads

You must be logged in to reply to this topic.