Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.84 KB | None | 0 0
  1.  
  2.  
  3. <div>
  4. <{$attr[j]->getName()|escape}>
  5. <{if $attributeColor == 1}>
  6. <{section name="k" loop=$attributeValues}>
  7. <{assign var="selectedAttribute" value='attribute-'|cat:$attr[j]->getAttributeId()|cat:'-'|cat:$attributeValues[k]->getAttributeValueId()}>
  8. <div class="attribute-color">
  9. <div class="titletip"><{$attributeValues[k]->getVal()}></div>
  10. <{assign var="attribute_price" value=$product->getAttributePrice($attributeValues[k]->getAttributeValueId())}>
  11. <{if !$product->getAttributePrice($attributeValues[k]->getAttributeValueId())}>
  12. <{assign var="attribute_price" value=$product->getRealPrice(null, null, true)}>
  13. <{/if}>
  14. <{assign var="aColor" value=","|explode:$attributeValues[k]->getVal()}>
  15. <{if $settings.price.only_variant_in_stock == "yes"}>
  16. <{if $product->getInStock($attr[j]->getAttributeId(), $attributeValues[k]->getAttributeValueId()) > 0}>
  17. <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}>>
  18. <label for="attribute-<{$attr[j]->getAttributeId()}>-<{$attributeValues[k]->getAttributeValueId()}>" class="attribute-color-button" style="background-color: <{$attributeValues[k]->getTag()}>;"></label>
  19. <{/if}>
  20. <{else}>
  21. <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}>>
  22. <label for="attribute-<{$attr[j]->getAttributeId()}>-<{$attributeValues[k]->getAttributeValueId()}>" class="attribute-color-button" style="background-color: <{$attributeValues[k]->getTag()}>;"></label>
  23. <{/if}>
  24. </div>
  25. <{/section}>
  26. <{else}>
  27. <select name="attributes[<{$attr[j]->getAttributeId()}>]" class="attribute" required>
  28. <option value="" disabled selected>Vælg venligst</option>
  29.  
  30. <{section name="k" loop=$attributeValues}>
  31. <{assign var="attribute_price" value=$product->getAttributePrice($attributeValues[k]->getAttributeValueId())}>
  32. <{if !$product->getAttributePrice($attributeValues[k]->getAttributeValueId())}>
  33. <{assign var="attribute_price" value=$product->getRealPrice(null, null, true)}>
  34. <{/if}>
  35. <{assign var="aColor" value=","|explode:$attributeValues[k]->getVal()}>
  36. <{if $settings.price.only_variant_in_stock == "yes"}>
  37. <{if $product->getInStock($attr[j]->getAttributeId(), $attributeValues[k]->getAttributeValueId()) > 0}>
  38. <option value="<{$attributeValues[k]->getAttributeValueId()}>" data-price="<{$attribute_price|number_format:2:",":"."}>" data-rel="<{$aColor[0]|escape}>" data-tag="<{$attributeValues[k]->getTag()}>">
  39. <{$attributeValues[k]->getVal()|escape}>
  40. </option>
  41. <{/if}>
  42. <{else}>
  43. <option value="<{$attributeValues[k]->getAttributeValueId()}>" data-price="<{$attribute_price|number_format:2:",":"."}>" data-rel="<{$aColor[0]|escape}>" data-tag="<{$attributeValues[k]->getTag()}>">
  44. <{$attributeValues[k]->getVal()|escape}>
  45. </option>
  46. <{/if}>
  47. <{/section}>
  48. </select>
  49. <{/if}>
  50. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement