Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <{assign var="profile" value=$product->getProfile()}><{assign var="attr" value=$profile->getAttributeList()}>
- <form action="" method="post" class="addtobasket">
- <?php require_once 'modal.php'; ?>
- <input type="hidden" name="product_id" value="
- <{$product->getProductId()}>"/>
- <input type="hidden" name="redirect" value="
- <{$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}>
- <div>
- <div class="hvad"><{$attr[j]->getName()|escape}>
- </div><{if $attributeColor == 1}><{section name="k" loop=$attributeValues}><{assign var="selectedAttribute" value='attribute-'|cat:$attr[j]->getAttributeId()|cat:'-'|cat:$attributeValues[k]->getAttributeValueId()}>
- <div class="attribute-color">
- <div class="titletip"><{$attributeValues[k]->getVal()}>
- </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}>
- <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}>>
- <label for="attribute-<{$attr[j]->getAttributeId()}>-<{$attributeValues[k]->getAttributeValueId()}>" class="attribute-color-button" style="background-color: <{$attributeValues[k]->getTag()}>;">
- </label><{/if}><{else}>
- <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}>>
- <label for="attribute-<{$attr[j]->getAttributeId()}>-<{$attributeValues[k]->getAttributeValueId()}>" class="attribute-color-button" style="background-color: <{$attributeValues[k]->getTag()}>;">
- </label><{/if}>
- </div><{/section}><{else}>
- <select name="attributes[<{$attr[j]->getAttributeId()}>]" class="attribute" required>
- <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}>
- <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}>
- </option><{/if}><{else}>
- <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}>
- </option><{/if}><{/section}>
- </select><{/if}>
- </div>
- <{ 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}>
- <div class="row">
- <div class="col-xs-8"><{/if}><{if $attr[j]->getName() != $attributeSymbols}>
- </div>
- <div class="col-xs-4"><{/if}>
- <label><{$attributeName}>
- </label><{if $attr[j]->getName() != $attributeSymbols}>
- <{elseif $attr[j]->getName() != $attributeImpact}><{assign var="attributeText" value=$attributeName|strpos:"("}><{assign var="attributeText" value=$attributeName|substr:$attributeText+5|substr:0:-8}>
- <{else}>
- <{/if}>
- <div>
- <div>
- <label for="front">Front:</label>
- <!-- preview selected //--><div id="frontHtml"></div>
- <!-- post selected //--><input type="text" name="front" name="attributes[<{$attr[j]->getAttributeId()}>]" id="front">
- <button id="myBtn"
- class="buttonOpenModal"
- data-saveto="#front"
- data-title="Forside tryk">Choose word</button>
- </div>
- <?php if(isset($twoSided) && $twoSided === true): ?>
- <div>
- <label for="front">Back:</label>
- <!-- preview selected //--><div id="backHtml"></div>
- <!-- post selected //--><input type="text" name="back" name="attributes[<{$attr[j]->getAttributeId()}>]" id="back">
- <button id="myBtn"
- class="buttonOpenModal"
- data-saveto="#back"
- data-title="Bagside tryk">Choose word</button>
- </div>
- <?php endif; ?>
- <{if $attr[j]->getName() != $attributeSymbols}>
- </div>
- </div><{/if}><{elseif $attr[j]->getDataType() == "integer"}>
- <input type="text" name="attributes[<{$attr[j]->getAttributeId()}>]" id="a
- <{$attr[j]->getAttributeId()}>" class="attribute"/><{elseif $attr[j]->getDataType() == "boolean"}>
- <input type="checkbox" name="attributes[<{$attr[j]->getAttributeId()}>]" value="1" id="a
- <{$attr[j]->getAttributeId()}>" class="attribute"/><{/if}>
- <div class="clearfix"></div><{else}>
- <div>
- <strong><{$attr[j]->getName()|escape}>:
- </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}>
- </div>
- <div class="clear"></div><{/if}><{/section}>
- <div class="hvad">Antal:</div>
- <input type="number" min="1" name="amount" value="1" maxlength="3"/>
- <input type="submit" value="Læg i kurven" style="margin-bottom: 50px;"/>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement