SHARE
TWEET

Untitled

a guest Jan 23rd, 2019 118 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <{assign var="profile" value=$product->getProfile()}><{assign var="attr" value=$profile->getAttributeList()}>
  2.  
  3.  
  4. <form action="" method="post" class="addtobasket">
  5.     <?php require_once 'modal.php'; ?>
  6.  
  7.  
  8.  
  9.  
  10.  <input type="hidden" name="product_id" value="
  11.  <{$product->getProductId()}>"/>
  12.   <input type="hidden" name="redirect" value="
  13.   <{$product->getMetaValue('redirect')|escape}>"/><{section name="j" loop=$attr}><{if $attr[j]->getIsVariant()}><{if $attr[j]->getDataType() == "valuelist"}><{assign var="attributeName" value=$attr[j]->getName()}><{assign var="attributeValues" value=$attr[j]->getValues()}><{assign var="attributeColor" value=0}><{section name="k" loop=$attributeValues}><{assign var="attributeTag" value=$attributeValues[k]->getTag()}><{assign var="attributeTagCheckColor" value=$attributeTag|regex_replace:"/^#/i":" "}><{if $attributeTag != $attributeTagCheckColor}><{assign var="attributeColor" value=1}><{/if}><{/section}>
  14.    <div>
  15.     <div class="hvad"><{$attr[j]->getName()|escape}>
  16.     </div><{if $attributeColor == 1}><{section name="k" loop=$attributeValues}><{assign var="selectedAttribute" value='attribute-'|cat:$attr[j]->getAttributeId()|cat:'-'|cat:$attributeValues[k]->getAttributeValueId()}>
  17.     <div class="attribute-color">
  18.      <div class="titletip"><{$attributeValues[k]->getVal()}>
  19.      </div><{assign var="attribute_price" value=$product->getAttributePrice($attributeValues[k]->getAttributeValueId())}><{if !$product->getAttributePrice($attributeValues[k]->getAttributeValueId())}><{assign var="attribute_price" value=$product->getRealPrice(null, null, true)}><{/if}><{assign var="aColor" value=","|explode:$attributeValues[k]->getVal()}><{if $settings.price.only_variant_in_stock == "yes"}><{if $product->getInStock($attr[j]->getAttributeId(), $attributeValues[k]->getAttributeValueId()) > 0}>
  20.      <input type="radio" name="attributes[<{$attr[j]->getAttributeId()}>]" id="attribute-<{$attr[j]->getAttributeId()}>-<{$attributeValues[k]->getAttributeValueId()}>" value="<{$attributeValues[k]->getAttributeValueId()}>" data-price="<{$attribute_price|number_format:2:",":"."}>" data-rel="<{$aColor[0]|regex_replace:"/[^a-z0-9]/i":""|lower}>" data-tag="<{$attributeValues[k]->getTag()}>" required <{if $get.$selectedAttribute}>checked<{/if}>>
  21.       <label for="attribute-<{$attr[j]->getAttributeId()}>-<{$attributeValues[k]->getAttributeValueId()}>" class="attribute-color-button" style="background-color: <{$attributeValues[k]->getTag()}>;">
  22.       </label><{/if}><{else}>
  23.       <input type="radio" name="attributes[<{$attr[j]->getAttributeId()}>]" id="attribute-<{$attr[j]->getAttributeId()}>-<{$attributeValues[k]->getAttributeValueId()}>" value="<{$attributeValues[k]->getAttributeValueId()}>" data-price="<{$attribute_price|number_format:2:",":"."}>" data-rel="<{$aColor[0]|regex_replace:"/[^a-z0-9]/i":""|lower}>" data-tag="<{$attributeValues[k]->getTag()}>" required <{if $get.$selectedAttribute}>checked<{/if}>>
  24.        <label for="attribute-<{$attr[j]->getAttributeId()}>-<{$attributeValues[k]->getAttributeValueId()}>" class="attribute-color-button" style="background-color: <{$attributeValues[k]->getTag()}>;">
  25.        </label><{/if}>
  26.       </div><{/section}><{else}>
  27.       <select name="attributes[<{$attr[j]->getAttributeId()}>]" class="attribute" required>
  28.        <option value="" disabled selected>Vælg venligst</option><{section name="k" loop=$attributeValues}><{assign var="attribute_price" value=$product->getAttributePrice($attributeValues[k]->getAttributeValueId())}><{if !$product->getAttributePrice($attributeValues[k]->getAttributeValueId())}><{assign var="attribute_price" value=$product->getRealPrice(null, null, true)}><{/if}><{assign var="aColor" value=","|explode:$attributeValues[k]->getVal()}><{if $settings.price.only_variant_in_stock == "yes"}><{if $product->getInStock($attr[j]->getAttributeId(), $attributeValues[k]->getAttributeValueId()) > 0}>
  29.        <option value="<{$attributeValues[k]->getAttributeValueId()}>" data-price="<{$attribute_price|number_format:2:",":"."}>" data-rel="<{$aColor[0]|escape}>" data-tag="<{$attributeValues[k]->getTag()}>"><{$attributeValues[k]->getVal()|escape}>
  30.        </option><{/if}><{else}>
  31.        <option value="<{$attributeValues[k]->getAttributeValueId()}>" data-price="<{$attribute_price|number_format:2:",":"."}>" data-rel="<{$aColor[0]|escape}>" data-tag="<{$attributeValues[k]->getTag()}>"><{$attributeValues[k]->getVal()|escape}>
  32.        </option><{/if}><{/section}>
  33.       </select><{/if}>
  34.      </div>
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.      <{  elseif $attr[j]->getDataType() == "string"}><{assign var="attributeName" value=$attr[j]->getName()}><{assign var="attributeValues" value=$attr[j]->getValues()}><{assign var="attributeImpact" value=$attr[j]->getName()|regex_replace:"/impacts|anslag/i":" "}><{assign var="attributeSymbols" value=$attr[j]->getName()|regex_replace:"/Symbols|Symbol/i":" "}><{if $attr[j]->getName() != $attributeImpact}>
  44.      <div class="row">
  45.       <div class="col-xs-8"><{/if}><{if $attr[j]->getName() != $attributeSymbols}>
  46.       </div>
  47.       <div class="col-xs-4"><{/if}>
  48.        <label><{$attributeName}>
  49.        </label><{if $attr[j]->getName() != $attributeSymbols}>
  50.       <{elseif $attr[j]->getName() != $attributeImpact}><{assign var="attributeText" value=$attributeName|strpos:"("}><{assign var="attributeText" value=$attributeName|substr:$attributeText+5|substr:0:-8}>
  51.        
  52.  
  53.          <{else}>
  54.          
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.          <{/if}>
  63.  
  64.  
  65. <div>
  66.  
  67.  
  68.       <div>
  69.         <label for="front">Front:</label>
  70.         <!-- preview selected //--><div id="frontHtml"></div>
  71.         <!-- post selected //--><input type="text" name="front" name="attributes[<{$attr[j]->getAttributeId()}>]" id="front">
  72.         <button id="myBtn"
  73.          class="buttonOpenModal"
  74.          data-saveto="#front"
  75.          data-title="Forside tryk">Choose word</button>
  76.       </div>
  77.  
  78.       <?php if(isset($twoSided) && $twoSided === true): ?>
  79.       <div>
  80.         <label for="front">Back:</label>
  81.         <!-- preview selected //--><div id="backHtml"></div>
  82.         <!-- post selected //--><input type="text" name="back" name="attributes[<{$attr[j]->getAttributeId()}>]" id="back">
  83.         <button id="myBtn"
  84.          class="buttonOpenModal"
  85.          data-saveto="#back"
  86.          data-title="Bagside tryk">Choose word</button>
  87.       </div>
  88.       <?php endif; ?>
  89.  
  90.  
  91.  
  92.  
  93.  
  94.          <{if $attr[j]->getName() != $attributeSymbols}>
  95.  
  96.  
  97.  
  98.           </div>
  99.          </div><{/if}><{elseif $attr[j]->getDataType() == "integer"}>
  100.          <input type="text" name="attributes[<{$attr[j]->getAttributeId()}>]" id="a
  101.           <{$attr[j]->getAttributeId()}>" class="attribute"/><{elseif $attr[j]->getDataType() == "boolean"}>
  102.           <input type="checkbox" name="attributes[<{$attr[j]->getAttributeId()}>]" value="1" id="a
  103.            <{$attr[j]->getAttributeId()}>" class="attribute"/><{/if}>
  104.            <div class="clearfix"></div><{else}>
  105.            <div>
  106.             <strong><{$attr[j]->getName()|escape}>:
  107.             </strong><{if $attr[j]->getDataType() == "currencyvalue"}><{elseif $attr[j]->getDataType() == "valuelist"}><{$product->getAttributeValue($attr[j]->getAttributeId())}><{elseif $attr[j]->getDataType() == "string"}><{$product->getAttributeValue($attr[j]->getAttributeId())}><{elseif $attr[j]->getDataType() == "integer"}><{$product->getAttributeValue($attr[j]->getAttributeId())}><{elseif $attr[j]->getDataType() == "floatingpoint"}><{$product->getAttributeValue($attr[j]->getAttributeId())}><{elseif $attr[j]->getDataType() == "datetime"}><{$product->getAttributeValue($attr[j]->getAttributeId())}><{elseif $attr[j]->getDataType() == "boolean"}><{if $product->getAttributeValue($attr[j]->getAttributeId())}>Ja<{else}>Nej<{/if}><{/if}>
  108.            </div>
  109.            <div class="clear"></div><{/if}><{/section}>
  110.            <div class="hvad">Antal:</div>
  111.            <input type="number" min="1" name="amount" value="1" maxlength="3"/>
  112.            <input type="submit" value="Læg i kurven" style="margin-bottom: 50px;"/>
  113.           </form>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top