Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SagarJ

Pioneers
  • Posts

    9
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by SagarJ

  1. Hi Gurus, I need to install "Attributes as Images" for OSC 2.3 with QTPro 4.6. The add-on does not have the SQL file mentioned in the instructions. Any help getting all files for the Add-on? Thanks in advance, Sagar
  2. Well, we learn as we go! I am a complete newbie myself, but I did manage to get the QTPro setup running on my fresh OSCommerce 2.3.1 install. A bit of diligence & focus is all you need. Follow the manual steps as follows: 1. Copy the new files to their respective locations. The are located in the same folders they ought to go on your site anyways. Logical. 2. Go to PHPAdmin, select your database you used when you installed OSC. There should be a SQL tab/button/hyperlink somewhere. Copy the code in the config_and_new_install.sql file & click a button to run the sql. Typically names - Go, or Run, or Execute.... 3. Follow all the steps in the instruction manual carefully. Note - some statements ask for replacing existing code, while some code is to be appended. Step 11.3 will give you trouble though. I have just found a fix which worked for me and pasted it on the discussion forum. Refer the discussion forum here: http://www.oscommerce.com/forums/topic/31484-contribution-qtpro-quantity-tracking-professional/page__hl__qtpro Do start reading from the last page... most recent comments are displayed last. I am not sure about what is referred to by the "modified" OSC bit mentioned in the manual, but mine was a fresh OSC 2.3.1 install too. No other changes. I installed QTPro and it worked just fine. Good luck. Happy to help where I can... but my knowledge is very limited Sagar
  3. Hi All, I found the root cause of the error - "unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' error?" on line 290. Its solution is mentioned in the file - Manual_for_2.3.1.html, which has the step by step instructions. A bit of clarity is required, though. For manual step 11.3, the section that mentions : Find: <!-- options //--> to <!-- options eof //--> Change all between to: In the code given to be replaced, there are 4 unfinished "echo" statements (with no code immediately following the '). The statements are just displayed as follows: echo ' The instruction in the manual states to add the code from your existing "admin/products_attributes.php" file to complete each of the corresponding echo statements. In my case, I was using the vanilla products_attributes.php which came default with the OSC 2.3.1 install. I have replaced the echo statements accordingly and the code works! If you simply copy the code from step 11.3 into notepad, the unfinished echo ' statements are on Line 119, 138, 175, & 190. The complete code for step 11.3 which worked for me is given below: ----------------------------------------- <!-- options //--> <?php if ($action == 'delete_product_option') { // delete product option $options = tep_db_query("select products_options_id, products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id = '" . (int)$HTTP_GET_VARS['option_id'] . "' and language_id = '" . (int)$languages_id . "'"); $options_values = tep_db_fetch_array($options); ?> <tr> <td class="pageHeading"> <?php echo $options_values['products_options_name']; ?> </td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td colspan="3"><?php echo tep_black_line(); ?></td> </tr> <?php $products = tep_db_query("select p.products_id, pd.products_name, pov.products_options_values_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pov.language_id = '" . (int)$languages_id . "' and pd.language_id = '" . (int)$languages_id . "' and pa.products_id = p.products_id and pa.options_id='" . (int)$HTTP_GET_VARS['option_id'] . "' and pov.products_options_values_id = pa.options_values_id order by pd.products_name"); if (tep_db_num_rows($products)) { ?> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" align="center"> <?php echo TABLE_HEADING_ID; ?> </td> <td class="dataTableHeadingContent"> <?php echo TABLE_HEADING_PRODUCT; ?> </td> <td class="dataTableHeadingContent"> <?php echo TABLE_HEADING_OPT_VALUE; ?> </td> </tr> <tr> <td colspan="3"><?php echo tep_black_line(); ?></td> </tr> <?php $rows = 0; while ($products_values = tep_db_fetch_array($products)) { $rows++; ?> <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>"> <td align="center" class="smallText"> <?php echo $products_values['products_id']; ?> </td> <td class="smallText"> <?php echo $products_values['products_name']; ?> </td> <td class="smallText"> <?php echo $products_values['products_options_values_name']; ?> </td> </tr> <?php } ?> <tr> <td colspan="3"><?php echo tep_black_line(); ?></td> </tr> <tr> <td colspan="3" class="main"><br><?php echo TEXT_WARNING_OF_DELETE; ?></td> </tr> <tr> <td align="right" colspan="3" class="main"><br><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info, 'NONSSL') . '">'; ?><?php echo tep_image_button('button_cancel.gif', ' cancel '); ?></a> </td> </tr> <?php } else { ?> <tr> <td class="main" colspan="3"><br><?php echo TEXT_OK_TO_DELETE; ?></td> </tr> <tr> <td class="main" align="right" colspan="3"><br><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=delete_option&option_id=' . $HTTP_GET_VARS['option_id'] . '&' . $page_info, 'NONSSL') . '">'; ?><?php echo tep_image_button('button_delete.gif', ' delete '); ?></a> <?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info, 'NONSSL') . '">'; ?><?php echo tep_image_button('button_cancel.gif', ' cancel '); ?></a> </td> </tr> <?php } ?> </table></td> </tr> <?php } else { ?> <tr> <td colspan="3" class="pageHeading"> <?php echo HEADING_TITLE_OPT; ?> </td> </tr> <tr> <td colspan="3" class="smallText" align="right"> <?php $options = "select * from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . (int)$languages_id . "' order by products_options_id"; $options_split = new splitPageResults($option_page, MAX_ROW_LISTS_OPTIONS, $options, $options_query_numrows); echo $options_split->display_links($options_query_numrows, MAX_ROW_LISTS_OPTIONS, MAX_DISPLAY_PAGE_LINKS, $option_page, 'value_page=' . $value_page . '&attribute_page=' . $attribute_page, 'option_page'); ?> </td> </tr> <tr> <?php //++++ QT Pro: Begin Changed code ?> <td colspan="4"><?php echo tep_black_line(); ?></td> <?php //++++ QT Pro: End Changed Code ?> </tr> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"> <?php echo TABLE_HEADING_ID; ?> </td> <td class="dataTableHeadingContent"> <?php echo TABLE_HEADING_OPT_NAME; ?> </td> <?php //++++ QT Pro: Begin Changed code ?> <td class="dataTableHeadingContent"> <?php echo TABLE_HEADING_TRACK_STOCK; ?> </td> <?php //++++ QT Pro: End Changed Code ?> <td class="dataTableHeadingContent" align="center"> <?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <tr> <?php //++++ QT Pro: Begin Changed code ?> <td colspan="4"><?php echo tep_black_line(); ?></td> <?php //++++ QT Pro: End Changed Code ?> </tr> <?php $next_id = 1; $rows = 0; $options = tep_db_query($options); while ($options_values = tep_db_fetch_array($options)) { $rows++; ?> <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>"> <?php if (($action == 'update_option') && ($HTTP_GET_VARS['option_id'] == $options_values['products_options_id'])) { echo '<form name="option" action="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=update_option_name&' . $page_info, 'NONSSL') . '" method="post">'; $inputs = ''; for ($i = 0, $n = sizeof($languages); $i < $n; $i ++) { $option_name = tep_db_query("select products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id = '" . $options_values['products_options_id'] . "' and language_id = '" . $languages[$i]['id'] . "'"); $option_name = tep_db_fetch_array($option_name); $inputs .= $languages[$i]['code'] . ': <input type="text" name="option_name[' . $languages[$i]['id'] . ']" size="20" value="' . $option_name['products_options_name'] . '"> <br>'; } ?> <td align="center" class="smallText"> <?php echo $options_values['products_options_id']; ?><input type="hidden" name="option_id" value="<?php echo $options_values['products_options_id']; ?>"> </td> <td class="smallText"><?php echo $inputs; ?></td> <?php //++++ QT Pro: Begin Changed code ?> <td align="center" class="smallText"><input type=checkbox name=track_stock <?php echo $options_values['products_options_track_stock']?"checked":""; ?>></td> <?php //++++ QT Pro: End Changed Code ?> <td align="center" class="smallText"> <?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?> <?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info, 'NONSSL') . '">'; ?><?php echo tep_image_button('button_cancel.gif', IMAGE_CANCEL); ?></a> </td> <?php echo '</form>' . "\n"; } else { ?> <td align="center" class="smallText"> <?php echo $options_values["products_options_id"]; ?> </td> <td class="smallText"> <?php echo $options_values["products_options_name"]; ?> </td> <?php //++++ QT Pro: Begin Changed code ?> <td align="center" class="smallText"> <?php echo $options_values['products_options_track_stock']?"Yes":"No"; ?></td> <?php //++++ QT Pro: End Changed Code ?> <td align="center" class="smallText"> <?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=update_option&option_id=' . $options_values['products_options_id'] . '&' . $page_info, 'NONSSL') . '">'; ?><?php echo tep_image_button('button_edit.gif', IMAGE_UPDATE); ?></a> <?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=delete_product_option&option_id=' . $options_values['products_options_id'] . '&' . $page_info, 'NONSSL') , '">'; ?><?php echo tep_image_button('button_delete.gif', IMAGE_DELETE); ?></a> </td> <?php } ?> </tr> <?php $max_options_id_query = tep_db_query("select max(products_options_id) + 1 as next_id from " . TABLE_PRODUCTS_OPTIONS); $max_options_id_values = tep_db_fetch_array($max_options_id_query); $next_id = $max_options_id_values['next_id']; } ?> <tr> <?php //++++ QT Pro: Begin Changed code ?> <td colspan="4"><?php echo tep_black_line(); ?></td> <?php //++++ QT Pro: End Changed Code ?> </tr> <?php if ($action != 'update_option') { ?> <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>"> <?php echo '<form name="options" action="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=add_product_options&' . $page_info, 'NONSSL') . '" method="post"><input type="hidden" name="products_options_id" value="' . $next_id . '">'; $inputs = ''; for ($i = 0, $n = sizeof($languages); $i < $n; $i ++) { $inputs .= $languages[$i]['code'] . ': <input type="text" name="option_name[' . $languages[$i]['id'] . ']" size="20"> <br>'; } ?> <td align="center" class="smallText"> <?php echo $next_id; ?> </td> <td class="smallText"><?php echo $inputs; ?></td> <?php //++++ QT Pro: Begin Changed code ?> <td align="center" ><input type=checkbox name=track_stock></td> <td align="left" class="smallText"> <?php echo tep_image_submit('button_insert.gif', IMAGE_INSERT); ?> </td> <?php //++++ QT Pro: End Changed Code echo '</form>' ?> </tr> <tr> <?php //++++ QT Pro: Begin Changed code ?> <td colspan="4"><?php echo tep_black_line(); ?></td> <?php //++++ QT Pro: End Changed Code ?> </tr> <?php } } ?> </table></td> <!-- options eof //--> -------------------------------- Hope that helps solve your error too! Good luck. SagarJ
  4. Please - I have the same error and clueless on how to resolve it.
  5. Hi Angela, I am in the same state as you are! Even I have installed OSC v 2.3.1 and need to install QTPro. The instructions assume you know your way around, which isn't the case for me either. I am going to try the following: 1. Backup all files. I am doing this by copying all files to my computer (locally) in a directory, zipping it up and storing it with a date/time stamp. Also, backup the database. The hosting provider will have a way to do this and would be able to help. 2. Copy all files to their destinations. I am doing this as follows: Unzip the QTPro to a directory (say, C:\UnZipQTP). It puts new files in certain subfolders. E.g. UnZipQTP\qtpro4.6.1\2.3.1\newfiles\Catalog\admin\includes\functions\qtpro_functions.php I'll then copy the "qtpro_functions.php" to the folder "public_html\Catalog\admin\includes\functions\" on the server of my website. Similarly, I'll copy the rest of the new files to their relevant folders. I believe the new files need to be added along with the files that already exist. Copying (&replacing) the directory will delete the previous files (I don't think the instruction wants to do this) 3. Import SQL. This is a bit different step. As it makes database changes, I believe I should run the SQL statements listed in the "config_and_new_install.sql" on my server database. I'll be doing this through the phpAdmin tools where I can run SQL statements. The next steps are to make the suggested changes to a number of files. Use the change 2.3.1.html as a guide. It mentions the folder\filename, text to search for and text to replace or add new. It has a checklist button for each step. Mighty useful I say. Gurus of OSC - Please correct me if I have misunderstood any step or doing anything wrongly. Newbie Learner, Sagar
×
×
  • Create New...