*

tejville

  • **
  • 11 posts
Text that appears with Add to cart button
« on: October 04, 2023, 10:07:14 PM »
Hello guys,

so, I want when a product has Add to Cart button, also to have a button text, but only when the button appears. Screenshot attached

I've made this code but it seems not to work as i wanted, it steal appears on all listings

Code: [Select]
        <?php if(function_exists('osp_product_to_cart_link')) { ?>
        <?php echo osp_product_to_cart_link(); ?>
        <div class="box" id="protection">
          <div class="point">
            <div class="icon i1"><i class="far fa-credit-card"></i></div>
            <span><?php _e('Never pay down a deposit in a bank account until you have met the seller, seen signed a purchase agreement.''epsilon'); ?></span>
          </div>
        </div>
        <?php ?>

Any ideas how to solve the code?

Thank you!

*

MB Themes

Re: Text that appears with Add to cart button
« Reply #1 on: October 06, 2023, 07:19:36 PM »
I am not quite sure what problem you have.
Button looks ok, text look ok.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

tejville

  • **
  • 11 posts
Re: Text that appears with Add to cart button
« Reply #2 on: October 06, 2023, 10:53:51 PM »
I want the text to appear when the button appears, so when a product doesn't have "Add to cart" button, also the text to be hidden.

Chears!

*

MB Themes

Re: Text that appears with Add to cart button
« Reply #3 on: October 08, 2023, 09:27:51 AM »
Ok, add some condition, I think add to cart link will be empty if add to cart is not enabled on product.
Function will however exists:)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots