Jump to content

taitaiji

Members
  • Content count

    17
  • Joined

  • Last visited


Reputation Activity

  1. Like
    taitaiji got a reaction from XPerties in Can I remove the "-OR- PayPal Express" ?   
    Solved: whoever wants to do as I did, getting rid of the guest checking out option with paypal express without loosing the payment option in later checkout do the following:
     
    delete from >catalog >shopping_cart.php
     

    <?php $initialize_checkout_methods = $payment_modules->checkout_initialization_method(); if (!empty($initialize_checkout_methods)) { ?> <p align="right" style="clear: both; padding: 15px 50px 0 0;"><?php echo TEXT_ALTERNATIVE_CHECKOUT_METHODS; ?></p> <?php reset($initialize_checkout_methods); while (list(, $value) = each($initialize_checkout_methods)) { ?> <p align="right"><?php echo $value; ?></p> <?php } } ?>
  2. Like
    taitaiji reacted to SagarJ in [Contribution] QTpro - Quantity Tracking Professional   
    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
×