Monday, February 24, 2014

joomla 3.2.2 update breaks custom captcha

Joomla 3.2.2 update breaks custom recaptcha components as they need mootools. To fix just add
JHtml::_('behavior.formvalidation');
to the component to force mootools to load
OR
if you're not using a component go old school and add
  src="/media/system/js/mootools-core.js"

to your template

Tuesday, February 18, 2014

shopify minimalist theme SOLD circle

add this to product-loop.liquid snippet

    {% if product.available == false %}
    {% if settings.show_sale_circle %}
    SOLD
    {% endif %}
  {% endif %}

Wednesday, February 12, 2014

mysql select values from this month, this year

SELECT * FROM table_name WHERE MONTH(timestamp) = MONTH(CURDATE()) AND YEAR(timestamp) = YEAR(CURDATE())