Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OhTrinity

Members
  • Content count

    21
  • Joined

  • Last visited

  • Days Won

    1

OhTrinity last won the day on April 28 2010

OhTrinity had the most liked content!

1 Follower

Profile Information

  • Real Name
    David Ledyard
  1. OhTrinity

    osC3 Simple Content Manager forum

    Regarding the Short Text limit in the database... I also switched the format of cell "cms_short_text" of table osc_cms from VARCAR to TEXT.... opting to restrict the number of characters to 180 characters at the form field layer of the stack via a simple JavaScript I found.... Results: Pop-Up Alert on 180 + 1 char key-up event, with auto truncation of text group within the Form's textarea field. changed file.../admin/includes/applications/cms/pages/edit.php lines 141 down <!-- additional for short text description --> <tr> <td valign="top"><?php echo $osC_Language->get('field_short_text'); ?></td> <td><script language="javascript" type="application/javascript" > function textLimit(field, maxlen) { if (field.value.length > maxlen + 1) alert('Sorry, Description is limited to 180 characters!'); if (field.value.length > maxlen) field.value = field.value.substring(0, maxlen); } </script> <?php echo osc_draw_textarea_field('cms_short_text[' . $l['id'] . ']', (isset($osC_ObjectInfo) && isset($cms_short_text[$l['id']]) ? $cms_short_text[$l['id']] : null), 70, 5, 'style="width: 100%;" id="pds' . $l['id'] . '" onkeyup="textLimit(this, 180);" '); ?> </td> </tr> <!-- end of additional short text description --> End of Solution Hope this helps... Another Problem I Found, Cross_Sell (for me at least). -- Did find some out of the box problems that I fixed on my own... Link Failure: (products.php?[product_name]) should be (products.php?[product_keyword]) The Links weren't working due to the product_name being used within the product call link... I modified the query to get the product_keyword value and modified the concatenated mark-up to use the product_keyword instead of the product_name. Also, the default set-up has a bug where it shows products that are in a disabled state. This really should be fix for the next iteration. p.products_status = 1 Also was getting duplicate listing for product that have more than one image attached to the product.. pip.default_flag = 1 here is what I did... Not sure if this is to the conventional best practice standards, as I'm new to osC3 MY EDIT of osc3 file includes/modules/content/cross_sell.php Circa Line 50 .... I updated the query $cross_sell_query = $osC_Database->query("SELECT DISTINCT xp.xsell_id, xp.products_id, pd.products_name, pd.products_keyword, p.products_price, p.products_status, pip.image, pip.default_flag FROM products_xsell AS xp, osc_products AS p, osc_products_description AS pd, osc_products_images AS pip WHERE xp.products_id = $products_id AND pd.products_id = xp.xsell_id AND pip.products_id = xp.xsell_id AND p.products_id = xp.xsell_id AND p.products_status >= 1 AND pip.default_flag = 1"); Made two mods from circa line 181 to the end of file. /// mod 20100304 OhTrinity Substituded product_keyword for product_name ********************************** // $info_box_contents = array();// start around line 73 ************************************ // $info_box_contents[] = array('align' => 'left', 'text' => TEXT_CROSS_SELL_PRODUCTS); // new contentBoxHeading($info_box_contents); //$this->_content = $row = 0; $col = 0; //$this->_content = '<ol style="list-style: none;">'; while ($product=$cross_sell_query->next()) { $num= $cross_sell_query->numberOfRows(); //if($num%3==0) // { /// mod 20100304 OhTrinity Substituted product_keyword for product_name : centered contents and reduced the icon size // around line 86 ****************** $this->_content .= '<td valign="top" align="center" style="border:none">'.'<a href="'.(osc_href_link(FILENAME_PRODUCTS,$product['products_keyword'])).'"><img src=images/products/thumbnails/'.$product['image'].' border="0" alt="" width="33" height="33"></a><br>' .'<a href="'.(osc_href_link(FILENAME_PRODUCTS,$product['products_keyword'])).'">'.$product['products_name'].'</a> <br> Reg. <b>$'.$product['products_price'].'</b> </td>'; // $col ++; //echo $row; // if ($col > 2) { // $col = 0; $row ++; // } if($row%3==0) { $this->_content .= '</tr><tr>'; } } $this->_content .= ' </tr>' . '</table>'; // new contentBox($info_box_contents); ?> <!-- cross_sell_products_eof //--> <?php } //} $this->_content .= '<table><tr><td> </td></tr>' . //OhTrinity hack ADDED "<table><tr><td>" ... was having a conflict with other div layer placements due to an unclosed table ; not sure if this is the proper long term solution. '</table>'; } } ?> End of Solution... One other issue I found in the set-up files. In the file "products_xsell.sql" line 1 ... we need to add "osc_" to table name "configuration". INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Cross Sell', 'MAX_DISPLAY_XSELL', '6', 'Maximum number of products to display in the \'Cross Sell\' box', '3', '16', now()); Should be ... INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Cross Sell', 'MAX_DISPLAY_XSELL', '6', 'Maximum number of products to display in the \'Cross Sell\' box', '3', '16', now()); Hope this is also helpful to others... since I think it caused my initial install problems, was getting errors until I re-did installed by-hand. Another problem that I haven't yet figured out how to fix.... Some one else might know... I want to hide the module result box; when it has empty results. Another words, if there are no cross sell products assigned or articles available for the product... I don't want an empty table with the table heading visible when there are no results.
  2. OhTrinity

    Cool Flash Carousel Menu

    Looks to be a flash security Sandbox issue. Somewhere you specified www.mydomain.com where it should have been a relative path, so flash doesn't recognize that it is the same server.
  3. OhTrinity

    Cool Flash Carousel Menu

    Great contribution
×