fix: contact us button issue

This commit is contained in:
Anupam K
2020-08-31 14:00:27 +05:30
parent d4af7d612d
commit f9f26d2fa4
3 changed files with 30 additions and 19 deletions

View File

@@ -27,22 +27,25 @@
{% endif %} {% endif %}
</div> </div>
{% endif %} {% endif %}
{% if product_info.price and (cart_settings.allow_items_not_in_stock or product_info.in_stock) %}
<div class="mt-3"> <div class="mt-3">
<a href="/cart" {% if product_info.price and (cart_settings.allow_items_not_in_stock or product_info.in_stock) %}
class="btn btn-light btn-view-in-cart {% if not product_info.qty %}hidden{% endif %}" <a href="/cart"
role="button" class="btn btn-light btn-view-in-cart {% if not product_info.qty %}hidden{% endif %}"
> role="button"
{{ _("View in Cart") }} >
</a> {{ _("View in Cart") }}
<button </a>
data-item-code="{{item_code}}" <button
class="btn btn-outline-primary btn-add-to-cart {% if product_info.qty %}hidden{% endif %}" data-item-code="{{item_code}}"
> class="btn btn-outline-primary btn-add-to-cart {% if product_info.qty %}hidden{% endif %}"
{{ _("Add to Cart") }} >
</button> {{ _("Add to Cart") }}
</button>
{% endif %}
{% if cart_settings.show_contact_us_button %}
{% include "templates/generators/item/item_inquiry.html" %}
{% endif %}
</div> </div>
{% endif %}
</div> </div>
</div> </div>

View File

@@ -10,14 +10,11 @@
{{ _('Configure') }} {{ _('Configure') }}
</button> </button>
{% endif %} {% endif %}
{% if cart_settings.show_contact_us_button | int %} {% if cart_settings.show_contact_us_button %}
<button class="btn btn-link btn-inquiry" data-item-code="{{ doc.name }}"> {% include "templates/generators/item/item_inquiry.html" %}
{{ _('Contact Us') }}
</button>
{% endif %} {% endif %}
</div> </div>
<script> <script>
{% include "templates/generators/item/item_configure.js" %} {% include "templates/generators/item/item_configure.js" %}
{% include "templates/generators/item/item_inquiry.js" %}
</script> </script>
{% endif %} {% endif %}

View File

@@ -0,0 +1,11 @@
{% if shopping_cart and shopping_cart.cart_settings.enabled %}
{% set cart_settings = shopping_cart.cart_settings %}
{% if cart_settings.show_contact_us_button | int %}
<button class="btn btn-inquiry btn-primary-light" data-item-code="{{ doc.name }}">
{{ _('Contact Us') }}
</button>
{% endif %}
<script>
{% include "templates/generators/item/item_inquiry.js" %}
</script>
{% endif %}