W
W
webbra2017-08-02 18:56:32
PHP
webbra, 2017-08-02 18:56:32

How to assign to a variable in smarty php?

A product variant is assigned and passed to the order, how to make a condition so that if the variant is empty then variant='1' ?

if($('.variants').find('select[name=variant]').size()>0) variant = $('.variants').find('select').val();

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
webbra, 2017-08-02
@webbra

if($('.variants').find('select[name=variant]').size()<0) variant='1';
just changing <> doesn't help

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question