Jump to content

rocdy

Members
  • Content count

    150
  • Joined

  • Last visited

  • Days Won

    1

rocdy last won the day on May 29 2012

rocdy had the most liked content!

Profile Information

  • Real Name
    Rocdy Dewanto
  • Gender
    Male
  • Location
    Jakarta
  1. Thanks You very much. It working now. I just follow your instruction how to copy paste from this post. Happy because learn some new metode to copy paste :) Thank Spook! :)
  2. I have tried that but it show error : IMAGE DOES NOT EXIST (maybe the images can't read from the directory images/products) but the images was uploaded in the products folder. And how about the delete images, should i change this code to : // Simple multi image addon $products_image_array = array(); for ($i = 1; $i <= (int)$_POST['image_array_limit']; ++$i) { if (!isset($HTTP_POST_VARS['products_image_' . $i])) continue; if (tep_not_null($HTTP_POST_VARS['products_image_'. $i]) && ($HTTP_POST_VARS['delete_image_' .$i] != 'on')) { $products_image_array[] = tep_db_prepare_input($HTTP_POST_VARS['products_image_'. $i]); } if ($HTTP_POST_VARS['delete_image_' .$i] == 'on' && $HTTP_POST_VARS['unlink_image_' .$i] == 'on' && file_exists(DIR_FS_CATALOG_IMAGES . tep_db_prepare_input($HTTP_POST_VARS['products_image_'. $i]))) { if (unlink(DIR_FS_CATALOG_IMAGES . tep_db_prepare_input($HTTP_POST_VARS['products_image_'. $i]))) $messageStack->add('Image ' . $HTTP_POST_VARS['products_image_'. $i] . ' Deleted & removed from the server.', 'success'); } } $sql_data_array['products_image_array'] = serialize($products_image_array); // EOF Simple multi image addon and this to : // check if the catalog image directory exists if (is_dir(DIR_FS_CATALOG_IMAGES)) { if (!is_writeable(DIR_FS_CATALOG_IMAGES)) $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error'); } else { $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error'); } Thanks for the fast reply. :)
  3. Hello Spooks. Your Simple Multi Images addon look great! I just want to change the directory where the products images saved. I want to save the product images in the folder catalog/images/products/ Which file should i looking for? The javascript file or any else php files? Thank before. Sorri for my bad English. Best Regard Rocdy. :)
  4. This is what i wait for. Thanks. I still have home work to uninstall Additional Images Addon before install Simple Additional Images Addon. :)
  5. I found some issue in this addon. When i delete additional images or delete product. The products images are still in images directory, it just delete the value in the database, not the products images in the catalog/images/ :blink: :blush:
  6. Woow......... I have tested it in fresh install oscommerce-2.2rc2a. Wonderfull..... Thanks You Sam for this Contributions. Just want to khow, are we can add more upload images box when create new products. I want to know where i can set it in admin. In there just have New Additional Image (1), New Additional Image (2), New Additional Image (3).
  7. Where i can see the demo of this contributions installed on oscommerce shop. I have additional Images addon intalled but because that i can't use fancybox for the popup images. Soo i want to use this addon for the solution. Thanks before. :)
  8. rocdy

    Ajax Order Editor

    Need advice for AJAX ORDER editor? I have use this addon for 6 month and this usefull addon. And i got this issue when i try to create more than 3 new total it will appear like below : test: Rp.1.000 test2: Rp.2.000 test3: Rp.3.000 Total: Rp.6.000 test4: Rp.4.000 test5: Rp.5.000 test6: Rp.6.000 Create New Total The number test4 new total are show below the total. and this is what i want : test: Rp.1.000 test2: Rp.2.000 test3: Rp.3.000 test4: Rp.4.000 test5: Rp.5.000 test6: Rp.6.000 Total: Rp.21.000 Create New Total and this is the code in order.php related to this create new total : <?php for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) { if (($order->totals[$i]['class'] != 'ot_subtotal') && ($order->totals[$i]['class'] != 'ot_total') && ($order->totals[$i]['class'] != 'ot_tax')) { echo ' <tr>' . "\n" . ' <td align="right" class="smallText"><a href="java script: updateOrdersTotal(\'' . $oID . '\', \'' . $order->totals[$i]['class'] . '\', \'' . addslashes(htmlspecialchars($order->totals[$i]['title'])) . '\', \'title\')"><u>' . $order->totals[$i]['title'] . '</u></a></td>' . "\n" . ' <td align="right" class="smallText"><a href="java script: updateOrdersTotal(\'' . $oID . '\', \'' . $order->totals[$i]['class'] . '\', \'' . $order->totals[$i]['value'] . '\', \'value\')"><u>' . $order->totals[$i]['text'] . '</u></a></td>' . "\n" . ' </tr>' . "\n"; } else { echo ' <tr>' . "\n" . ' <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" . ' <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" . ' </tr>' . "\n"; } } //link to create a new order_total echo ' <tr>' . "\n" . ' <td align="right" class="smallText" colspan="2"><a href="java script: createOrdersTotal(\'' . $oID . '\')"><u>Create New Total</u></a></td>' . "\n" . ' </tr>' . "\n"; ?> and this is the $action : } elseif ($action == 'orders_total_update') { if ($HTTP_GET_VARS['column'] == 'value') { $text_query = tep_db_query("select text, value from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $HTTP_GET_VARS['oID'] . "' and class = '" . $HTTP_GET_VARS['class'] . "'"); $text_ = tep_db_fetch_array($text_query); $text = str_replace(round((float)$text_['value'], 2), round((float)$HTTP_GET_VARS['new_value'] , 2), $text_['text']); tep_db_query("update " . TABLE_ORDERS_TOTAL . " set text = '" . $text . "' where orders_id = '" . $HTTP_GET_VARS['oID'] . "' and class = '" . $HTTP_GET_VARS['class'] . "'"); } tep_db_query("update " . TABLE_ORDERS_TOTAL . " set " . $HTTP_GET_VARS['column'] . " = '" . $HTTP_GET_VARS['new_value'] . "' where orders_id = '" . $HTTP_GET_VARS['oID'] . "' and class = '" . $HTTP_GET_VARS['class'] . "'"); tep_db_update_totals($HTTP_GET_VARS['oID']); //that's it, tell the administrator //ENGLISH echo 'Total updated.' . "\n" . 'Refresh the browser to see the changes.'; } elseif ($action == 'new_order_total') { $sort_order_query = tep_db_query("select max(sort_order) as maxim from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $HTTP_GET_VARS['oID'] . "' and class != 'ot_total'"); $sort_order = tep_db_fetch_array($sort_order_query); $new_sort_order = (int)$sort_order['maxim'] + 1; //get the order's currency $currency_query = tep_db_query("select currency, currency_value from " . TABLE_ORDERS . " where orders_id = '" . $HTTP_GET_VARS['oID'] . "'"); $currency = tep_db_fetch_array($currency_query); $class_query = tep_db_query("select class from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $HTTP_GET_VARS['oID'] . "' and class like '%ot_extra_%'"); $classs = 'ot_extra_' . (tep_db_num_rows($class_query) + 1); $new_order_total_value_txt = $currencies->format($HTTP_GET_VARS['value'], true, $currency['currency'], $currency['currency_value']); tep_db_query("insert into " . TABLE_ORDERS_TOTAL . " (orders_id, title, text, value, class, sort_order) values ('" . $HTTP_GET_VARS['oID'] . "', '" . $HTTP_GET_VARS['title'] . ":', '" . $new_order_total_value_txt . "', '" . round((float)$HTTP_GET_VARS['value'], 4) . "', '" . $classs . "', '" . $new_sort_order . "')"); tep_db_update_totals($HTTP_GET_VARS['oID']); //that's it, tell the administrator //ENGLISH echo 'Total updated.' . "\n" . 'Refresh the browser to see the changes.'; } Any advice will be very appreciated. Thanks before. laugh.gif
  9. rocdy

    Ajax Order Editor

    Just new AJAX ORDER EDITOR V2.0 here http://www.oscommerce.com/community/contri...x+orders+editor Enjoy it! :lol:
  10. Sorry, my problem was fixed. I just go to Admin-Configuration-Images and set Images Required to "false". :-)
  11. I have just tested the more category latest version in here http://www.oscommerce.com/community/contributions,3327 I find out that the look in browser Internet Browser are not good, but it's run well in ire fox browser. Any idea about that?
  12. rocdy

    IP trap Version 3 released

    I was using other computer to test my IP trap and it is working, but when i try to test with my computer the IP trap doesn't work, and i have checked in the whitelist.txt and banned.txt that my IP was not there. Sorry for my bad english. But this addon still some great contributions for me. Thank You
  13. rocdy

    IP trap Version 3 released

    I have found this is good addon in version 2.1 but when i upgrade into version 3 it not working. I just tested and i find my ip have not banned when i type www.bnetb-tanahabang.com/personal two or three time. Any idea about this issue?
  14. rocdy

    SiteMonitor

    Thank You. My error was fixed. I forgot to write my username in configuration. Thank for this usefull contribution. :-)
  15. rocdy

    SiteMonitor

    First i want to say thank you for this great contributions, but i just gets some error when i do manually sitemonitor it's bring me to this error warning : Warning: opendir(/home/username/public_html) [function.opendir]: failed to open dir: No such file or directory in /home/xxxxxxxx/public_html/admin/includes/functions/sitemonitor_functions.php on line 99 Warning: readdir(): supplied argument is not a valid Directory resource in /home/xxxxxxxx/public_html/admin/includes/functions/sitemonitor_functions.php on line 101 Reference file creation failed. Any idea about that will be very appreciated. :)
×