Jump to content
Latest News: (loading..)

Peper

Members
  • Content count

    471
  • Joined

  • Last visited

1 Follower

About Peper

  • Birthday 11/28/1975

Profile Information

  • Real Name
    Pierre
  • Gender
    Male
  • Location
    South Africa
  • Website

Recent Profile Visitors

23,217 profile views
  1. Printing different printers

    @wHiTeHaT As far as I understand this, the PHP code cannot do this at client side I have to install the php 5.5 version first on another pc to further test, currently running php 7.1.9 (Zend: 3.1.0) Just now busy checking and deciphering whats is needed and happening here <?php $tmpdir = sys_get_temp_dir(); # ambil direktori temporary untuk simpan file. $file = tempnam($tmpdir, 'tmp'); # nama file temporary yang akan dicetak $handle = fopen($file, 'w'); $condensed = Chr(27) . Chr(33) . Chr(4); $bold1 = Chr(27) . Chr(69); $bold0 = Chr(27) . Chr(70); $initialized = chr(27).chr(64); $condensed1 = chr(15); $condensed0 = chr(18); $Data = $initialized; $Data .= $condensed1; $Data .= "==========================\n"; $Data .= "| ".$bold1."OFIDZ MAJEZTY".$bold0." |\n"; $Data .= "==========================\n"; $Data .= "Ofidz Majezty is here\n"; $Data .= "We Love PHP Indonesia\n"; $Data .= "We Love PHP Indonesia\n"; $Data .= "We Love PHP Indonesia\n"; $Data .= "We Love PHP Indonesia\n"; $Data .= "We Love PHP Indonesia\n"; $Data .= "--------------------------\n"; fwrite($handle, $Data); fclose($handle); copy($file, "//localhost/EPSOM LX-300"); # Lakukan cetak unlink($file); ?>
  2. Printing different printers

    @wHiTeHaT The printers can only print if it is printed on the same server machine as far as i could find out - php_printer.dll. Also this was removed from newer versions Apache PHP Seems this cant be done or there is no easy way this will error: $handle=printer_open("EPSON LX-300"); printer_open — Opens a connection to a printer (PECL printer SVN) PHP Fatal error: Call to undefined function printer_open() in /home/---/--/----/courier_print.php on line 39
  3. I tried to adapt the product questions module to display in the same way that the reviews is showing, instead of stars questions asked add upvote or like button for - itemprop="upvoteCount After a while i had to give up, too complex for me Using the questions module from ask a product question, @reflex-ocasion and Product Question @suryapraveen i came up with following in product_info.php I mixed some code with both addons to get what is needed to display something workable for my liking On that upvote button, please help and improve this questions module once and for all <!--start Product Questions--> <div class="col-xs-12" style="display:block" > <b><?php echo TEXT_PRODUCT_QUESTIONS; ?></b> <br /> <?php $qtns_qry = tep_db_query("select * from product_questions where product_id='" . $_GET['products_id'] . "' and status='1' order by date_added limit 2"); $tab2content = ''; if (tep_db_num_rows($qtns_qry) == 0) { $tab2content .= NO_PRODUCT_QUESTIONS; } else { $i = 1; while($qtnslist = tep_db_fetch_array($qtns_qry)) { $tab2content .= '<div itemscope itemtype="https://schema.org/Question"><div itemprop="text">' . $qtnslist['question'] . '</div><div><br>Asked ' . $qtnslist['date_added'] . ' By<time itemprop="dateCreated" datetime="' . $qtnslist['date_added'] . '"></time></div><div itemprop="author" itemscope itemtype="https://schema.org/Person"><span itemprop="name">' . $qtnslist['customer_name'] . '</span></div><br>'; $tab2content .= '<b>Answer:</b> <div itemprop="suggestedAnswer acceptedAnswer" itemscope itemtype="https://schema.org/Answer"><div itemprop="text">' . $qtnslist['answer'] .'</div></div> <div itemprop="author" itemscope itemtype="http://schema.org/Person">Answered by <span itemprop="name">' . STORE_NAME . '</span></div></div><br />'; $i++; } $tab2content .= '<a style="color:#990000; font-weight:bold; text-decoration:none; font-size:13px; padding-right:25px;" href="' . tep_href_link('product_questions.php', 'products_id='.$_GET['products_id']) . '">'. TEXT_VIEW_ALL .'</a>'; } if (tep_session_is_registered('customer_id') || (ALLOW_ASK_A_QUESTION == 'true')) { $tab2content .= '<a style="color:#990000; font-weight:bold; text-decoration:none; font-size:13px;" href="' . tep_href_link('ask_a_question.php', 'products_id='.$_GET['products_id']) . '"> ' . TEXT_ASK_QUESTION . '</a><br /><br />'; } echo $tab2content; ?> </div> <!--end Product Questions--> product_questions.php similar modification while($questions = tep_db_fetch_array($questions_query)) { echo '<div class="col-xs-12">'; echo '<div class="contentText"><div itemscope itemtype="https://schema.org/Question"><div itemprop="text">' . $questions['question'] . '</div><div><br>Asked ' . $questions['date_added'] . ' By<time itemprop="dateCreated" datetime="' . $questions['date_added'] . '"></time></div><div itemprop="author" itemscope itemtype="https://schema.org/Person"><span itemprop="name">' . $questions['customer_name'] . '</span></div><br></div>'; echo '<b>Answer:</b> <div itemprop="suggestedAnswer acceptedAnswer" itemscope itemtype="https://schema.org/Answer"><div itemprop="text">' . $questions['answer'] .'</div></div> <div itemprop="author" itemscope itemtype="http://schema.org/Person">Answered by <span itemprop="name">' . STORE_NAME . '</span></div></div>'; echo '</div>'; $i++; } ask_a_question.php product_questions.php
  4. Printing different printers

    While researching this, i got sidetracked <body bgcolor="chucknorris"> test </body> Will give red background and so a few similar other examples Did not know that!
  5. Hey Frank @frankl Thanks for tip there Also, like that product tabs showing in picabove, you know which addon is best to use for this? I will find this usefull
  6. Thanks for this update!

  7. Google just love this type of content. I had it with my older site but not on edge now. Also I have seen one of our competitors with only meta title tags and was out ranking everyone - wordpress site with shop Also customers is not willing to write reviews and so, on the other had if they get something back they more than happy to write one. So if example a coupon code can be made for writing a testimonial or review(review better) it will be great
  8. Hello everyone So i assume many shop owners prints a lot of different papers like packing slips, barcodes, waybills and and So my question is there a way to specify which printer to use by default depending on filename or form or page size. So instead of the popup window when ctl p or print button is pressed, no input needed to select correct printer and fiddles - automates. Not silent printing Even if in the admin side viewing document first, any way to list available printers locally and on shared network using html, show available printers or rather specific - select printer - mouse click and print. Please post if you know something in this line, there was some PHP functions but seems that was deprecated and dropped entirely.
  9. New orders blank customer info

    Thanks for checking Henry(how to mention??) That code is in the checkout_process.php file I have found that it is always a new customer, the account is created badly meaning maybe very slow internet or page did not load completely The details for this specific customers is always missing the info in customers_info table, no info in address_info table I tried now modify and adding like this in checkout_payment.php, it still passes // if no shipping method has been selected, redirect the customer to the shipping method selection page if (!tep_session_is_registered('shipping')|| !tep_session_is_registered('sendto')) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } "But lack of visionary unfortunately missing" After 10 years working on my osc store, lacking is not the answer, your competitors will eat osc alive
  10. Every now and then some customer does not check what they are doing So then customer orders, we get a blank order with no name or delivery, billing info on it. Searching the database can give us some idea who it was though. So now I need to come up with a brilliant idea to stop the checkout_confirmation.php and redirect customer to add his address and add as primary address checkout_confirmation.php i changed the following, however not 100% to prevent what info is needed // Perform address check, else blank customers info on order $check_query = tep_db_query("select address_book_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' limit 1"); $check_query_now = tep_db_fetch_array($check_query); if (tep_not_null($check_query_now['address_book_id'])) { // load the selected shipping module require(DIR_WS_CLASSES . 'shipping.php'); $shipping_modules = new shipping($shipping); } else { tep_redirect(tep_href_link('address_book_process.php')); } now, cause if this is not the primary address, the shipping and delivery addresses can still be passed blank to an order How to check for this and give error for the customer to have it filled in or automatically add as primary address?
  11. PHP7 html_output.php errors

    Ok, I found it In admin i disabled modules 1 x 1 and once testimonials was disable warnings went away So then checked Display the View button (for current testimonial) = true then errors pops up again Module Version 2.1
  12. PHP7 html_output.php errors

    ver 2.3.4.1 https://github.com/gburton/Responsive-osCommerce/ Used winmerge to compare I know my site buttons was changed to use a qty box instead of single add to cart button Unless im on the wrong track for new file updates
  13. Hello there Anyone got errors with PHP 7 for file includes/html_output.php Warning: Illegal string offset 'type' in C:\xampp\htdocs\edge\includes\functions\html_output.php on line 409Warning: Illegal string offset 'type' in C:\xampp\htdocs\edge\includes\functions\html_output.php on line 412Warning: Illegal string offset 'type' in C:\xampp\htdocs\edge\includes\functions\html_output.php on line 413 and few other same type errors I compared and could not figure this out 409: $params['type'] = 'submit'; 412: if ( !in_array($params['type'], $types) ) { 413: $params['type'] = 'submit'; 416: if ( ($params['type'] == 'submit') && isset($link) ) { // Output a jQuery UI Button function tep_draw_button($title = null, $icon = null, $link = null, $priority = null, $params = null, $style = null) { static $button_counter = 1; $types = array('submit', 'button', 'reset'); if ( !isset($params['type']) ) { $params['type'] = 'submit'; } if ( !in_array($params['type'], $types) ) { $params['type'] = 'submit'; } if ( ($params['type'] == 'submit') && isset($link) ) { $params['type'] = 'button'; } if (!isset($priority)) { $priority = 'secondary'; } $button = NULL; if ( ($params['type'] == 'button') && isset($link) ) { $button .= '<a id="btn' . $button_counter . '" href="' . $link . '"'; if ( isset($params['newwindow']) ) { $button .= ' target="_blank"'; } } else { $button .= '<button '; $button .= ' type="' . tep_output_string($params['type']) . '"'; } if ( isset($params['params']) ) { $button .= ' ' . $params['params']; } $button .= ' class="btn '; $button .= (isset($style)) ? $style : 'btn-default'; $button .= '">'; if (isset($icon) && tep_not_null($icon)) { $button .= ' <span class="' . $icon . '"></span> '; } $button .= $title; if ( ($params['type'] == 'button') && isset($link) ) { $button .= '</a>'; } else { $button .= '</button>'; } $button_counter++; return $button; }
  14. Advanced Specials

    Thanks Tsimi I have sorted this out with "" <?php echo number_format(tep_add_tax($specials['specials_new_products_price'], $tax_rate),intval($currencies->currencies[DEFAULT_CURRENCY]["decimal_places"]), $currencies->currencies[DEFAULT_CURRENCY]["decimal_point"], "");?>"/> <?php echo $percent_select; ?></td>
  15. Advanced Specials

    It does not seem that classes/currencies is responsible for that , Any way to remove that thousands , entirely in specials?
×