Jump to content

SentiJB

Member
  • Posts

    46
  • Joined

  • Last visited

Everything posted by SentiJB

  1. so when you have : yourstore.com/index.php?a=getcontent&content_id=the_id_for_the_content 1) how can you get the_id_for_the_content from the url. is that something like : $the_id = $_GET['the_id_for_the_content']; 2) how can you set that it has to search for customer id AND the_id_for_the_content $where = array('customer_id' => $GLOBALS['user']->get('customer_id')); if (($get_the_content = $GLOBALS['db']->select('CubeCart_database_name', false, $where, array('id' => 'DESC'), $per_page, $page, false)) !== false) { can't seem to get it to work
  2. ok thx , will see if it works with only the post things. Will clean up the code also ok this is the function for the string : function randomString($length = 30) { $str = ""; $characters = array_merge(range('A', 'Z'), range('a', 'z'), range('0', '9')); $max = count($characters) - 1; for ($i = 0; $i < $length; $i++) { $rand = mt_rand(0, $max); $str .= $characters[$rand]; } return $str; } how do i get to work that {$str} is filled in <p> <label for="rev_uniek_id">Uniek Aquarium ID</label> <input id="rev_uniek_id" type="text" name="aquarium[uniek_id]" value="{$str}" class="textbox" /> </p>
  3. 1. what am i doing wrong this is the form for putting the data in db : <form action="{$VAL_SELF}#aquarium_write" method="post"> <p> <label for="rev_naam_aquarium">Aquarium Naam</label> <input id="rev_naam_aquarium" type="text" name="aquarium[naam_aquarium]" value="{$WRITE.naam_aquarium}" class="textbox required" /> </p> <p> <label for="rev_public">Vink aan indien dit openbaar mag zijn </label> <input type="checkbox" id="rev_public" name="aquarium[public]" value="1" /> </p> <p> <label for="rev_uniek_id">Uniek Aquarium ID</label> <input id="rev_uniek_id" type="text" name="aquarium[uniek_id]" value="{$WRITE.uniek_id}" class="textbox" /> </p> <p> <label for="rev_opmerking_aquarium">Optionele Opmerking bij aquarium</label> <textarea id="rev_opmerking_aquarium" name="aquarium[opmerking_aquarium]" class="textbox required" rows="10" cols="40">{$WRITE.opmerking_aquarium}</textarea> </p> <p> <input type="submit" value="sla op" class="button_submit" /> </p> </form> this is what i put in cubecart class if (isset($_POST['aquarium']) && is_array($_POST['aquarium'])) { $error = false; foreach ($GLOBALS['hooks']->load('class.cubecart.aquarium') as $hook) { include $hook; } $record = array_map('htmlspecialchars', $_POST['aquarium']); $record['customer_id'] = $GLOBALS['user']->get('customer_id'); $record['uniek_id'] = (isset($_POST['uniek_id'])) ? $_POST['uniek_id'] : ''; $record['public'] = (isset($record['public'])) ? 1 : 0; $record['time'] = time(); if (!$error) { if (($id = $GLOBALS['db']->insert('CubeCart_aquarium', $record)) !== false) { foreach ($GLOBALS['hooks']->load('class.cubecart.aquarium.insert') as $hook) { include $hook; } $GLOBALS['gui']->setNotify(gelukt); } else { $GLOBALS['gui']->setError(niet gelukt); } httpredir(currentPage(null)); } else { foreach ($_POST['aquarium'] as $key => $value) { $_POST['aquarium'][$key] = htmlspecialchars($value); } $GLOBALS['smarty']->assign('WRITE', $_POST['aquarium']); } } database : 1 id Primaire sleutel int(10) UNSIGNED AUTO_INCREMENT 2 customer_id int(10) UNSIGNED 3 uniek_id text utf8_unicode_ci 4 time int(10) UNSIGNED 5 naam_aquarium text utf8_unicode_ci 6 opmerking_aquarium text utf8_unicode_ci 7 public tinyint(1) everything gets stored in the database EXCEPT: uniek_id public Searching whats wrong for a while now . What am i doing wrong. 2nd question : how can i generate a random number for field uniek_id can't use session_token , every input has to be different and do i post it to the form like this then ? : <p> <label for="rev_uniek_id">Uniek Aquarium ID</label> <input id="rev_uniek_id" type="text" name="aquarium[uniek_id]" value="{$the_random_token}" class="textbox" /> </p>
  4. Noodleman mods doesnt work for me. Host doesnt support the encription.
  5. Is there a mod for this : customers can upload picture with product. Or is it possible to copy filemanager from admin area to front area. so front end can use it. Searched the forum but cant find it
  6. thank you , that works. still learning i tried a lot of things. and something i really dont understand... when you look at the form to submit the review , you have the title and review box but it you look at the functions to add it in the database , nothing there to find for those boxes.
  7. im a bit struggling to get something working want to add an extra field in the review page so in content.product.php i add : <p> <label for="rev_bijkomend">bijkomende opmerking</label> <input id="rev_bijkomend" type="text" name="bijkomend" value="{$WRITE.bijkomend}" class="textbox" /> </p> in cubecart.class.php after $record['rating'] = (isset($_POST['rating'])) ? $_POST['rating'] : 0; $record['product_id'] = (int)$_GET['product_id']; $record['ip_address'] = get_ip_address(); $record['time'] = time(); i add $record['bijkomend'] = (isset($_POST['bijkomend'])); in database i added the new table bijkomend set as text utf8_unicode_ci but whatever i do , it doesn't store the field bijkomend in the database. What am i doing wrong ?
  8. loadContent('cart.payment_fraud' loadContent('cart.order_cancelled' meant , where is defined for sending the different emails to customers depending on the case
  9. latest version . if you add a note for customer (for an order and on the field customers can see) customers didn't see the note in there account - orders
  10. anyone can point out where this is defined ? case self::ORDER_FAILED: // Email the customer to explain their order failed fraud review $content = $mailer->loadContent('cart.payment_fraud', $order_summary['lang'], $this->_order_summary); break; case self::ORDER_CANCELLED: // Cancelled $content = $mailer->loadContent('cart.order_cancelled', $order_summary['lang'], $this->_order_summary); break;
  11. open cubecart.class.php ; find $summary['state'] = getStateFormat($summary['state']); $summary['country'] = getCountryFormat($summary['country']); $summary['state_d'] = is_numeric($summary['state_d']) ? getStateFormat($summary['state_d']) : $summary['state_d']; $summary['country_d'] = getCountryFormat($summary['country_d']); $summary['order_status'] = $GLOBALS['language']->order_state['name_'.$summary['status']]; $summary['vat_number'] = $GLOBALS['config']->get('config', 'tax_number'); add : $summary['note_to_customer'] = $note_to_customer;
  12. Even when its not added before in the card and you uncheck available for purchase you still can purchase it. ( with the skin i use) Just checked it. In database data for available is set to 0. That seems to be right. Will have a look at the coding later. Maybe it will be an easy fix. Edit : with the foundation skin there arent any problems. Will be skin related
  13. <div><label for="product_code_auto">{$LANG.catalogue.product_code_auto}</label><span><input name="product_code_auto" id="product_code_auto" type="hidden" class="toggle" {$PRODUCT.auto_code_checked} > <input name="product_code_old" id="product_code_old" type="hidden" value=""> </span></div> => how do i set this standard to checked when adding new product <div><label for="product_featured">{$LANG.catalogue.product_featured}</label><span><input type="hidden" name="featured" id="product_featured" class="toggle" value="{$PRODUCT.featured}"></span></div> <div><label for="product_latest">{$LANG.catalogue.product_latest}</label><span><input type="hidden" name="latest" id="product_latest" class="toggle" value="{$PRODUCT.latest}" ></span></div> => how do i set this standard to unchecked when adding new product
  14. I wanna make the hard changes to the coding itself and edit the coding for the add and edit function of the products. But for the moment i cant find the coding page for the products.php Before it was easy to find. In Early versions you went to admin folder search for addproduct.php or editproduct.php and you could change whatever you want using notepad Thank you will have a look
  15. Hi all. First of all it has been ages i was online here and used cc. ( i even had to make a New login. So all my old mods and messages are gone) Dont know if any of the old users are still online. My previous nick was Jbdancer A lot has changed in cc. Getting to know the New programming but struggling, after searching on forum aswell, to find some functions. Using last version of cc Admin area : 1. Where can i find the function to call for the products from database ( to add New ones / edit products) 2. Where is the scripting page for adding and editing products. => wanna add extra content to the add/edit page => want to change check boxes to standard unchecked creating New product/editing Front end : 3. Where can i find the function to add a product review in database (the function to add the review in database) 4. Where is the page itself for that function. => want to change the page to add extra content boxes and want to change it that users need to be loged in. Can a moderator contact me also with the New rules for adding free mods?
×
×
  • Create New...