Jump to content

Targeting Limited combinations


cyanoxide

Recommended Posts

 
Hi there, I'm currently in the process of creating some product warning messages for my site. I've managed to make one for when the product is completely sold out, one for if it's sold out but sales are still being allowed and I've got one for if everything is in stock but I'm not sure how to go about making one for if only some of the product attributes are in stock.
 
This is what I have so far:
 
{if $product->quantity <= 0 && !$allow_oosp}
                  {if $product->available_later}
                  <div class="status-box" style="border-color:#b72b39;">
                      <div class="status-heading" style="background-color:#b72b39;">Sold Out</div>
                      <div class="status-desc">{$product->available_later|substr:($product->available_later|strpos:"#"+1) }</div>
                  </div>
                  {/if}
                {elseif $product->quantity <= 0}
                  {if $product->available_later}
                      <div class="status-box">
                          <div class="status-heading">{$product->available_later|substr:0:($product->available_later|strpos:"#"-1) }</div>
                          <div class="status-desc">{$product->available_later|substr:($product->available_later|strpos:"#"+1) }</div>
                      </div>
                  {/if}
                {else} 
                  {if $product->available_now}
                  <div class="status-box">
                      <div class="status-heading">{$product->available_now|substr:0:($product->available_now|strpos:"#"-1) }</div>
                      <div class="status-desc">{$product->available_now|substr:($product->available_now|strpos:"#"+1) }</div>
                  </div>
                  {/if}
                {/if}
 

What would be the best way to create an if statement for if some products are out of stock but not all?

 

Also if there are any states I'm missing at the moment feel free to let me know.

 

Thanks

                
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...