Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Sabufer

Newbie
  
  • Posts

    41
  • Joined

  • Last visited

Recent Profile Visitors

1,576 profile views

Sabufer's Achievements

Contributor

Contributor (5/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. вот это понятный пример class Test { public $some_property = '123'; } $obj = new Test; var_dump( $obj->some_property ) class Test
  2. $obj->Name = 'something'; $get = $obj->Name; magic($obj, 'Name', 'something'); $get = magic($obj, 'Name'); очень понятный пример
  3. Всмысле обьявлен типо так что ли ?? $this->product_id_related_new = $product_id_related; //вот имеено тут !!!!!!!!
  4. При получении getLastId() из другой функции первое значение у меня выходит NULL !! К примеру вот в данной функции я передаю в переменную полученный id public function addProductRelated(&$product_id_related, &$dataRelated) { $sql = ''; $sql = 'INSERT INTO `' . DB_PREFIX . 'product` SET ' . $sql; $this->db->query($sql); $product_id_related = $this->db->getLastId(); if (isset($this->setting['product_store'])) { foreach ($this->setting['product_store'] as $store_id) { $this->db->query('INSERT INTO `' . DB_PREFIX . 'product_to_store` SET product_id = \'' . (int)$product_id_related . '\', store_id = \'' . (int)$store_id . '\''); } } if(!$product_id_related) return FALSE; $sql = ''; if(isset($this->field_caption['_NAME-RELATED_'])) { $sql .= ' name = REPLACE(\'' . $this->db->escape($dataRelated[$this->field_caption['_NAME-RELATED_']]) . '\', \'"\', \'"\'),'; } $this->product_id_related_new = $product_id_related; //вот имеено тут !!!!!!!! return true; } B и вывожу его в другой функции ! $get_product_id_related = $this->product_id_related_new; echo "<pre>"; var_dump($get_product_id_related); echo "</pre>"; и получаю результат ! Первое значение у меня NULL Но если я буду выводить данный getLastId() в самой функции то проблем у меня нет !
  5. решено сделал так $('.search_man_art').bind('click', function() { url = $('base').attr('href') + 'index.php?route=product/search'; var search_man = $(this).parent().parent().find('.proiz_info').text(); var search_model = $(this).parent().parent().find('.model').text(); if (search_model) { url += '&manufacturer=' + search_man +'&search=' + search_model; } location = url; });
  6. Извините конечно может я тупой но я реально не догоняю может вы мне на бытовом уровне ??
  7. я нашел вот $('input[name=\'search\']').bind('keydown', function(e) { if (e.keyCode == 13) { var ser_id = document.getElementById('ser_inp').value; var elem = ser_id.replace(/[^0-9a-zа-я]/gim, ''); document.getElementById('ser_inp').value = elem; url = $('base').attr('href') + 'index.php?route=product/search'; var search = $('input[name=\'search\']').attr('value'); search.replace(/^[\s\xa0]+|[\s\xa0]+$/g,""); if (search) { url += '&search=' + encodeURIComponent(search); } location = url; } });
×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.