• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 854
  • Last Modified:

shopify cart customize

<div id="col-main">

  <div id="product" class="clearfix content">

    <div id="product-information">

      <p id="add-to-cart-msg"></p>

      <div id="product-header" class="diagonal-divider clearfix">

        <div id="product-header-title">
          <h1 id="product-title">{{ product.title }}</h1>
          
          {% if settings.show_vendor %}<h2 id="product-vendor">{{ product.vendor | link_to_vendor }}</h2>{% endif %}
        </div>


      </div><!-- /#product-header -->
      <div class="description">
        {{ product.description }}
        
        <div id="variants">
   <form action="/cart/add" method="post">
      <table width="50%" border="0" class="variantstable">
    <thead>
       <tr>
          <th>Select</th>
	      <th>Options</th>
	      <th>Price</th>
	      <th>Availability</th>
	      <th>Delivery</th>
	   </tr>
	</thead>
	<tbody>
           {% for variant in product.variants %}
	      <tr style="background: {% cycle '#fff', '#eee',%};" >
		{% if variant.available == true %}
	           <th><input type="radio" name="id" value="{{variant.id}}" id="radio_{{variant.id}}" {%if forloop.first%} checked="checked" {%endif%} /></th>
		   <th><label for="radio_{{variant.id}}">{{ variant.title }}</label></th>
		   <th>{{ variant.price | money }}</th>
           
		      {% if variant.inventory_quantity > 0 %}
    		
    		<th>Available now</th>
			<th>48hrs</th>
		      {% else %}
			<th>On Order</th>
			<th>2 weeks</th>
		      {% endif %}

		{% else %}
		   <th>X</th>
		   <th>{{ variant.title }}</th>
           <th>{{ 0.00 }}</th>
           <th colspan="2">Unknown</th>
		   
           
		{% endif %}
	      </tr>
	   {% endfor %}
	      
	   
	</tbody>
     </table>
     {% unless product.available == false %}			
     <div><input type="submit" value="Add to Cart" name="Add" id="add" /></div>
     {% endunless %}
   </form>
 </div>
</div>     
        {% include 'social-sharing' %} 
        <div id=”issw”></div>
      
      
    </div><!-- /#product-information -->

      <div id="active-wrapper">
        {% if settings.main_image_display == 'Lightbox' %}
        <a href="{{ product.featured_image | product_img_url: 'original' }}" title="{{ product.featured_image.alt | escape }}" rel="fancybox">
        {% endif %}     
          <img style="max-width:303px" src="{{ product.featured_image | product_img_url: 'large' }}" alt="{{ product.title | escape }}" id="large-thumb" />
        {% if settings.main_image_display == 'Lightbox' %}
        
        </a>
        {% endif %}
        
        
        
      
      


      <ul id="thumbs" {% if product.images.size == 1 %}class="visuallyhidden"{% endif %}>
        {% for image in product.images %}
        {% unless forloop.first and settings.main_image_display == 'Lightbox' %}
        <li>
          <a{% if settings.main_image_display == 'Lightbox' %} rel="fancybox"{% endif %} class="gallery" href="{{ image | product_img_url: 'original' }}" title="{{ image.alt | escape }}">
            <img src="{{ image | product_img_url: 'thumb' }}" alt="{{ image.alt | escape }}" />
          </a>
        </li>
        {% endunless %}
        {% endfor %}
        <div class="gvproduct" data-id="{{ product.id}}"></div>
      </ul>
      
    </div><!-- /#product-gallery -->

  </div><!-- /#product -->

  {% if settings.productspg_related_products %}
  
    {% include 'related-products' %}

  {% elsif settings.productspg_featured_collection != blank %}

    {% assign collection = collections[settings.productspg_featured_collection] %}
    {% assign products   = collection.products %}

    {% if products.size > 0 %}
      <section class="diagonal-divider clearfix">

        {% unless settings.productspg_featured_collection_heading == blank %}
        <header class="section-details clearfix">
          <h1 class="section-title">{{ settings.productspg_featured_collection_heading | link_to: collection.url }}</h1>
        </header> 
        {% endunless %}

        <ul class="product-grid" id="secondary-grid">
          {% for product in products limit: settings.productspg_featured_limit %}
          <li class="{% cycle '', '', '', 'last-in-row' %}">
            {% include 'product-grid-item' %}
          </li>
          {% endfor %}
        </ul> 
        

      </section>
    {% endif %}

  {% endif %}

</div><!-- /#col-main -->
                                  

Open in new window


when the product is not in stock, i want to say "out of stock"
and Next shipment : unknown

now whats happening is both in stock & next shipment result is unknown
attached screenshot

language using is liquid
http://wiki.shopify.com/UsingLiquid
dd.png
0
ammadeyy2020
Asked:
ammadeyy2020
1 Solution
 
ammadeyy2020Author Commented:
line between 51 & 55
0
 
selvolCommented:
{% if variant.not_in_stock, == Unknown %}
 {%  variant.not_in_stock, == Out of Stock %}
 {%  variant.next_shipment, == unknown %}
 
              {% endif %}

Selvol
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now