Jump to content

PupStar

Members
  • Content count

    946
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by PupStar

  1. PupStar

    New management and osCommerce v4

    First of all congratulations on the takeover. It has been a long time coming. I hope this does not mean we will see the eventual squeezing out of the dedicated members who kept oscommerce alive in the form of Phoenix. Without their hard work and commitment oscommerce would have gone the way of zencart, cube cart and creloaded. Can I ask does V4 = https://www.trueloaded.co.uk/ Or a slimmed down non commercial version of???
  2. PupStar

    Copy Script Issues

    I am having a very boring lockdown sunday afternoon so having a play about. Working locally not specifically on oscommerce but using osc tables. I am trying to copy categories from one table to another. <a href="update_live_categories.php?id=$row[categories_id]"><button class="btn btn-primary" type="submit">Update Categories</button></a> <?php $databaseHost = 'localhost'; //your db host $databaseName = 'tbl_temp_products'; //your db name $databaseUsername = 'root'; //your db username $databasePassword = '';// db password $mysqli = mysqli_connect($databaseHost, $databaseUsername, $databasePassword, $databaseName); $id = $_GET['categories_id']; $sql="select * from tbl_temp_categories where (categories_id='$id')";// check id is already copied $result=mysqli_query($mysqli,$sql); if (mysqli_num_rows($result) > 0) { // output data of each row $row = mysqli_fetch_assoc($result); if($id==$row['categories_id']) { echo "Already copied"; //error message if already copied } } else{ $query = "INSERT INTO categories SELECT * FROM tbl_temp_categories WHERE categories_id=$id"; if (mysqli_query($mysqli, $query)) { echo "New record created successfully"; } else { echo "Error: " . $query . "" . mysqli_error($mysqli); } } ?> This script is throwing 1 notice and 1 error on this line $id = $_GET['categories_id']; and on this line $query = "INSERT INTO categories SELECT * FROM tbl_temp_categories WHERE categories_id=$id"; Any ideas on a resolve? Thank you
  3. PupStar

    Copy Script Issues

    @ecartz Thanks Matt but I must admit that the logic way over my head lol
  4. PupStar

    Copy Script Issues

    @raiwa Thank you but unfortunately it made no difference
  5. PupStar

    Copy Script Issues

    @Jack_mcs @raiwa Thanks for the help and sorry about the late reply, the day job is taking its toll during this lockdown I have modified the code and now there are no errors or notices however nothing is being copied to the new table. <a href="update_live_categories.php?categories_id=$row[categories_id]"><button class="btn btn-primary" type="submit">Update Categories</button></a> <?php $databaseHost = 'localhost'; //your db host $databaseName = 'tbl_temp_products'; //your db name $databaseUsername = 'root'; //your db username $databasePassword = '';// db password $mysqli = mysqli_connect($databaseHost, $databaseUsername, $databasePassword, $databaseName); $id = 1; $sql="select parent_id, categories_id from tbl_temp_categories where (categories_id='$id')";// check id is already copied $result=mysqli_query($mysqli,$sql); if (mysqli_num_rows($result) > 0) { // output data of each row $row = mysqli_fetch_assoc($result); if($id==$row['categories_id']) { echo "Already copied"; //error message if already copied }else{ $query = "INSERT INTO categories SELECT parent_id, categories_id FROM tbl_temp_categories WHERE categories_id=$id"; if (mysqli_query($mysqli, $query)) { echo "New record created successfully"; } else { echo "Error: " . $query . "" . mysqli_error($mysqli); } } } ?>
  6. PupStar

    Copy Script Issues

    @raiwaNot sure why it would need a form as once you click the button it should just copy data from one table to another.
  7. @JcMagpie Just wondering if you have tried this on the latest version of Phoenix, I have but got this error
  8. PupStar

    Customer Orders Tab in Admin Orders (hook)

    @@BrockleyJohn ok did a fresh copy of the files, not sure what happened but its now working spot on :) Thanks
  9. PupStar

    Customer Orders Tab in Admin Orders (hook)

    @@BrockleyJohn, ok grabbed them files and nothing has changed and no errors urgh
  10. PupStar

    Customer Orders Tab in Admin Orders (hook)

    @@BrockleyJohn I am using the latest version of Edge which I downloaded 02/10 I have placed 4 test orders for the same customer and still no 'All Orders' tab
  11. PupStar

    Customer Orders Tab in Admin Orders (hook)

    @@BrockleyJohn I have installed this and I dont seem to have an 'All Orders' tab showing even though there are 3 test orders placed. Am I missing something? Thanks Mark
  12. @@auzStar oh yes the vertical centering is ok.
  13. yes to the above. I found that changing left: 50%; to left: 38%; solved the centralising issue
  14. @@auzStar personally I left if unstyled as on my test environment it shows the animation off set to the right on full view but on mobile view in chrome it shows in the center. Mark
  15. @@auzStar May I suggest that the animated loading gif be replaced with an animated icon to keep in with the bootstrap theme bodyContent_listing.html(\'<div class="text-center"><span class="fa fa-cog fa-spin fa-4x fa-fw"></span></div>\'); Mark
  16. forget it I have it sorted. It was because I had no description entered into the test product! >_< Hi, I have installed the above contribution on 2.3.1 and it works to a degree. The admin panel is working correctly and inserting the products_id into the star_product table. However the catalog side is not displaying the product, just an empty box with no image, no price etc. Would someone take a look for me and see if they can see what I am missing? <?php function tep_star_product_with_attributes($products_id) { $attributes_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "'"); $attributes = tep_db_fetch_array($attributes_query); if ($attributes['count'] > 0) { return true; } else { return false; } } $star_products_query = tep_db_query("select substring(pd.products_description, 1, 100) as products_description, p.products_id, p.products_image, p.manufacturers_id, p.products_price, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, p.products_tax_class_id, sp.product_id from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_STAR_PRODUCT . " sp) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_id = pd.products_id and p.products_status = '1' and pd.products_description != '' and p.products_id=sp.product_id and pd.language_id = '" . $languages_id . "'"); $star_products = tep_db_fetch_array($star_products_query); $star_products['products_name'] = tep_get_products_name($star_products['products_id']); $evita_cortar_palabras = explode( ' ', $star_products["products_description"] ); array_pop( $evita_cortar_palabras ); $star_products["products_description"] = implode( ' ', $evita_cortar_palabras ); $star_products_price = $star_products; if (tep_not_null($star_products_price['specials_new_products_price'])) { $new_price = '<span class="starPrice">' . $currencies->display_price($star_products_price['specials_new_products_price'], tep_get_tax_rate($star_products_price['products_tax_class_id'])) . '</span><br>'; $new_price .= '<span style="color:#ffffff;font-size:12px; font-weight:normal;"><s>' . $currencies->display_price($star_products_price['products_price'], tep_get_tax_rate($star_products_price['products_tax_class_id'])) . '</s></span>'; } else { $new_price = '<span class="starPrice">' . $currencies->display_price($star_products_price['products_price'], tep_get_tax_rate($star_products_price['products_tax_class_id'])). '</span>'; } if (!tep_star_product_with_attributes($star_products['products_id'])) { $star_products["0"] = array('align' => 'left', 'params' => 'width="100%" valign="top" padding="0"', 'text' => ' <table class="box_outline3" width="99%" border="0" cellpadding="0" cellspacing="0" > <tr> <td width="191" rowspan="3" align="right" valign="top" background="images/star_img.gif"><table width="191" border="0" cellpadding="0"> <tr> <td width="30" align="left" valign="top"> <div style="padding-left:7px; padding-top:15px; " align="left" >'.$new_price . '</div></td> <td height="115" align="right" valign="middle"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td> </tr> </table> </td> <td height="3" align="right" class="starTitle"> </td> </tr> <tr> <td align="left" valign="top"><div style="padding-left:20px;"> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '"><span class="starName" >' . $star_products['products_name'] . '</span></a><br /> <span class="starTitle" >'.STAR_TITLE.'</span><br /> <span class="starProdDesc" > <div style="padding-right:15px;" >'. strip_tags($star_products["products_description"]) . '...</div></span></td> </tr> </table>'); $star_products_output = array_slice($star_products, sizeof($star_products)-1); new contentBox1($star_products_output); } else { $star_products["0"] = array('align' => 'center', 'params' => 'width="100%" valign="top"', 'text' => ' <table class="box_outline3" width="99%" border="0" cellpadding="0" cellspacing="0" > <tr> <td width="191" rowspan="3" align="right" valign="top" background="images/star_img.gif"><table width="191" border="0" cellpadding="0"> <tr> <td width="30" align="left" valign="top"> <div style="padding-left:7px; padding-top:15px; " align="left" >'.$new_price . '</div></td> <td height="115" align="right" valign="middle"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td> </tr> </table> </td> <td height="3" align="right" class="starTitle"> </td> </tr> <tr> <td align="left" valign="top"><div style="padding-left:20px;"> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '"><span class="starName" >' . $star_products['products_name'] . '</span></a><br /> <span class="starTitle" >'.STAR_TITLE.'</span><br /> <span class="starProdDesc" > <div style="padding-right:15px;" > '. strip_tags($star_products["products_description"]) . '...</div></span></td> </tr> </table>'); $star_products_output = array_slice($star_products, sizeof($star_products)-1); new contentBox1($star_products); } ?> Thanks Mark
  17. PupStar

    [Contribution] Ship In Cart

    @@Dan Cole sorry mate only localhost
  18. PupStar

    [Contribution] Ship In Cart

    @@Dan Cole Hi, Sterling work by the way from all involved in this :thumbsup: All other modules are set to 12
  19. PupStar

    [Contribution] Ship In Cart

    @@raiwa When the modules are side by side ie both modules content width set to 6 this is how it looks The modules are not aligning, any ideas? Mark
  20. PupStar

    Missing Payment Methods in admin

    @@LittleBigPet Mark, have you actually gone to admin>modules>payment and installed them?
  21. PupStar

    [Contribution] Documents Manager

    @@kymation Hi Jim, I have been working on expanding the code to associate a document with a category. So far the admin side works great. I have created a new table called documents_to_categories and duplicated the case code etc so now the document gets associated with a category. The problem I have now is getting the download link to show on the category page because at the moment it shows nothing. I have expanded the module code below but not sure if I need to either a) do more to show the link or B) modify the code in index.php to get it to work Any thoughts would be appreciated. <?php /* $Id: documents.php, v1.0.1 200909014 kymation Exp $ $Loc: catalog/includes/modules/ $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2009 osCommerce Released under the GNU General Public License */ // Generate a set of links to documents linked to this product $products_documents_query_raw = " select count(*) as total from " . TABLE_PRODUCTS_TO_DOCUMENTS . " where products_id = '" . (int) $_GET['products_id'] . "' "; $products_documents_query = tep_db_query ($products_documents_query_raw); $products_documents = tep_db_fetch_array ($products_documents_query); if ($products_documents['total'] > 0) { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td> <?php $buttons_array = array(); $products_documents_query_raw = " select d.documents_id, d.documents_name, d.documents_size, d.documents_title, dt.type_name, dt.type_description, d2c.documents_to_categories_id, d2c.categories_id, d2c.documents_id from " . TABLE_DOCUMENTS . " d, " . TABLE_DOCUMENT_TYPES . " dt, " . TABLE_PRODUCTS_TO_DOCUMENTS . " p2d, " . TABLE_DOCUMENTS_TO_CATEGORIES . " d2c, where p2d.products_id = '" . (int) $_GET['products_id'] . "' and d.documents_id = p2d.documents_id and dt.document_types_id = d.document_types_id and d2c.documents_id = d.documents_id and d.documents_visible = 'True' and dt.type_visible = 'True' order by dt.sort_order, d.sort_order "; $products_documents_query = tep_db_query ($products_documents_query_raw); while ($products_documents = tep_db_fetch_array ($products_documents_query) ) { // Separate the document name and the extension from the filename $documents_name = $products_documents['documents_name']; $filename_parts = pathinfo ($documents_name); $documents_name = $filename_parts['filename']; $documents_extension = $filename_parts['extension']; // Get the document information from the extension $document_type_array = tep_get_document_type ($documents_extension); echo '<span class="document_type">' . $products_documents['type_description'] . ':</span> '; echo '<span class="document"><a href="' . tep_href_link (DIR_WS_DOCUMENTS . $products_documents['type_name'] . '/' . $products_documents['documents_name']) . '" target="_new">'; echo $products_documents['documents_title']; echo ' [' . number_format ($products_documents['documents_size']) . ' k]'; echo ' ' . $document_type_array['icon']; echo '</a></span><br>'; } // while ($products_documents } // if ($products_documents ?> </td> </tr>
  22. PupStar

    [Contribution] Documents Manager

    @@kymation Hi Jim, I am trying to use your updated version on 2.3.4BS and so far the only bug I have found is that the documents will not upload to the respective folder. Also I need to add an option for category association if thats at all possible with the way the code stands. Mark
  23. PupStar

    Printer Ink & Toner Filter

    @@Tsimi ok I sorted it out, I had missed a couple of things out
×