Jump to content

rongrong

Members
  • Content count

    38
  • Joined

  • Last visited

Posts posted by rongrong


  1. Hi all,

    I've installed a few contribs to my store. (http://www.royalamulets.com/oscommerce-rc2a/index.php --> my very very very empty site)

    -UltraPics

    -STS

    -Extra fields

    and the most recent one

    -Product listing in colums.

     

    All was fine till I installed the last contrib. I could not see my shopping cart after clicking on the buy now on my product page. But when I access shopping cart via my side menu, I can see that the quantities have been updated (as I had tried adding from product page many times). I suspect application_top contains some errors.

     

    This is my shopping cart actions from application_top

    // Shopping cart actions

    if (isset($HTTP_GET_VARS['action'])) {

    // redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled

    if ($session_started == false) {

    tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));

    }

     

    if (DISPLAY_CART == 'true') {

    $goto = FILENAME_SHOPPING_CART;

    $parameters = array('action', 'cPath', 'products_id', 'pid');

    } else {

    $goto = basename($PHP_SELF);

    if ($HTTP_GET_VARS['action'] == 'buy_now') {

    $parameters = array('action', 'pid', 'products_id');

    } else {

    $parameters = array('action', 'pid');

    }

    }

    switch ($HTTP_GET_VARS['action']) {

    // customer wants to update the product quantity in their shopping cart

    case 'update_product' : for ($i=0, $n=sizeof($HTTP_POST_VARS['products_id']); $i<$n; $i++) {

    if (in_array($HTTP_POST_VARS['products_id'][$i], (is_array($HTTP_POST_VARS['cart_delete']) ? $HTTP_POST_VARS['cart_delete'] : array()))) {

    $cart->remove($HTTP_POST_VARS['products_id'][$i]);

    } else {

    if (PHP_VERSION < 4) {

    // if PHP3, make correction for lack of multidimensional array.

    reset($HTTP_POST_VARS);

    while (list($key, $value) = each($HTTP_POST_VARS)) {

    if (is_array($value)) {

    while (list($key2, $value2) = each($value)) {

    if (ereg ("(.*)\]\[(.*)", $key2, $var)) {

    $id2[$var[1]][$var[2]] = $value2;

    }

    }

    }

    }

    $attributes = ($id2[$HTTP_POST_VARS['products_id'][$i]]) ? $id2[$HTTP_POST_VARS['products_id'][$i]] : '';

    } else {

    $attributes = ($HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]]) ? $HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]] : '';

    }

    $cart->add_cart($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['cart_quantity'][$i], $attributes, false);

    }

    }

    tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

    break;

    // customer adds a product from the products page

    case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {

    $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);

    }

    tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

    break;

    case 'buy_now_form' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {

    $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+($HTTP_POST_VARS['cart_quantity']), $HTTP_POST_VARS['id']);

    $cart->get_quantity($HTTP_POST_VARS['products_id'])-($cart->get_quantity($HTTP_POST_VARS['products_id']))+($HTTP_POST_VARS['cart_quantity']), $HTTP_POST_VARS['id']);

    }

    tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

    break;

    // customer adds multiple products from the products_listing page

    case 'add_multiple' :

    while ( list( $key, $val ) = each( $HTTP_POST_VARS ) )

    {

    if (substr($key,0,11) == "Qty_ProdId_" || substr($key,0,11) == "Qty_NPrdId_")

    {

    $prodId = substr($key, 11);

    $qty = $val;

    if ($qty <= 0 ) continue;

    if(isset($HTTP_POST_VARS["id_$prodId"]) && is_array($HTTP_POST_VARS["id_$prodId"])) {

    // We have attributes

    $cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId,$HTTP_POST_VARS["id_$prodId"]))+$qty, $HTTP_POST_VARS["id_$prodId"]);

    } else {

    // No attributes

    $cart->add_cart($prodId, $cart->get_quantity($prodId)+$qty);

    }

    }

    }

    tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

    break;

    // performed by the 'buy now' button in product listings and review page

    case 'buy_now' : if (isset($HTTP_GET_VARS['products_id'])) {

    if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {

    tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));

    } else {

    $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);

    }

    }

    tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

    break;

    case 'notify' : if (tep_session_is_registered('customer_id')) {

    if (isset($HTTP_GET_VARS['products_id'])) {

    $notify = $HTTP_GET_VARS['products_id'];

    } elseif (isset($HTTP_GET_VARS['notify'])) {

    $notify = $HTTP_GET_VARS['notify'];

    } elseif (isset($HTTP_POST_VARS['notify'])) {

    $notify = $HTTP_POST_VARS['notify'];

    } else {

    tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));

    }

    if (!is_array($notify)) $notify = array($notify);

    for ($i=0, $n=sizeof($notify); $i<$n; $i++) {

    $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $notify[$i] . "' and customers_id = '" . $customer_id . "'");

    $check = tep_db_fetch_array($check_query);

    if ($check['count'] < 1) {

    tep_db_query("insert into " . TABLE_PRODUCTS_NOTIFICATIONS . " (products_id, customers_id, date_added) values ('" . $notify[$i] . "', '" . $customer_id . "', now())");

    }

    }

    tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));

    } else {

    $navigation->set_snapshot();

    tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

    }

    break;

    case 'notify_remove' : if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['products_id'])) {

    $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");

    $check = tep_db_fetch_array($check_query);

    if ($check['count'] > 0) {

    tep_db_query("delete from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");

    }

    tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action'))));

    } else {

    $navigation->set_snapshot();

    tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

    }

    break;

    case 'cust_order' : if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) {

    if (tep_has_product_attributes($HTTP_GET_VARS['pid'])) {

    tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['pid']));

    } else {

    $cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1);

    }

    }

    tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

    break;

    }

    }

     

    If i'm not wrong this shouldn't be too hard to fix. But I really have no idea so was hoping some guru could read through and point out probably a wrong variable to me.

    Thanks in advance!


  2. >_<

     

    www.asiatattoosupply.com

     

     

     

    As you can see, I've got a very plain text category menu on the right. I've got STS v4.5 and Dynamenu v112 installed. Not sure where to place this thread, in the STS thread or the Dynamenu thread?

     

    I'm thinking if I can make a STS infobox containing my cat menu (to make use of the simple method of customizing)? Or do I have to manually do a html table containing my cat? I'm looking at this kind of menu (http://www.tattoosuperstore.com/osc/index.php) the categories menu on the left. I'm totally clueless..


  3. i've a major question.

     

    i'm intending to create a new $tattoologo as a header image made clickable on all pages... dived in sts_user_code.php but couldn't figure out a way to do the coding. i'm a php-idiot. tried echo "<img src="images/layout/header.gif"> but doesn't work. is there another way to add in header image other than editing header.php?

     

     

    $sts->start_capture();

     

    //*what should i put here?//

     

    $sts->stop_capture('tattoologo');

     

    sorry if this question has been posted in this thread, not sure how to search within a thread. many thanks to the experts.


  4. somehow i got a feeling it's got somethign with do with dynamenu. when i click on links in index.php.html everything works fine but when i click on the tree links in my dynamenu (it's at the left column) the right column gets screwed up.

     

    sorry ignore this post please, i've disable dynamenu and the results still the same


  5. somehow i got a feeling it's got somethign with do with dynamenu. when i click on links in index.php.html everything works fine but when i click on the tree links in my dynamenu (it's at the left column) the right column gets screwed up.


  6. is there any ways i can set the right column fixed at that certain position?

     

    www.asiatattoosupply.com

     

    as you can see, the index page looks ok. but when i dive into my product page, the right menu floats underneath the $content...

    i've removed the product_info module and index module. so all would be set to default module. i've changed the table tags to div, i dun really like tables.

     

    here's my code for index.php.html (which i've set as default in the default module)

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html $htmlparams>
    <head>
    <!--$headcontent-->
     <link rel="stylesheet" type="text/css" href="stylesheet.css">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
    <head>
    
    <body >
    <div style="background:url(http://www.asiatattoosupply.com/cart/images/logo.jpg); height:188; width:658"></div>
    <div id="leftlayer">
    $catmenu<p>
    $categorybox
    $searchbox
    $informationbox</div>
    <div id="centrelayer">$content</div>
    <div id="rightlayer">$cartbox
     $maninfobox
     $orderhistorybox
     $bestsellersbox
    $currenciesbox</div>
    </body>
    </html>

     

    here's my stylesheet

    #leftlayer
    {
    position:absolute;
    left:3px;
    top:201px;
    width:160px;
    height:70px;
    z-index:0;
    }
    
    #rightlayer
    {
    position: absolute;
    width:200px;
    height:115px;
    z-index:0;
    left: 720px;
    top: 150px;
    }
    
    #centrelayer
    {
    position:absolute;
    width: 600px;
    z-index:0;
    left:200px;
    top:200px
    }

     

    i'm pretty sure there is a simple solution to this but i've been figuring out the whole afternnon... i dun really wanna configure product_info.php.html now. btw if i really really have to do it, can i create a default product info to display all the products in the same way? the files in the sts folder has got the product id in the filenames, meaning each product is configured in different way?


  7. I've installed "add weight to product attributes". put in all my weight through phpadmin ( i've finished 200+ products before i've installed this and i can't find a way to edit the weight of my products through admin) only to find out my shipping has gone mad.

     

    initially it worked (after the contrib installation), for a few items. now whatever i tried to add into my shopping cart, the shipping will always show $15.

     

    are there any problems with my admin configuration? i'm using table mode and this is my config

     

    shipping rate:
    1:14,2:19,3:24,4:29,5:33,6:38,7:44,8:48,9:53,10:57
    
    Table Method: weight
    
    Handling: $1

     

     

    and this is from my Configuration/Shipping and Packaging:

     

    Country of Origin: Singapore   
    Postal Code: NONE   
    Enter the Maximum Package Weight you will ship: 100   
    Package Tare weight.: 0   
    Larger packages - percentage increase: 50

     

    i'm doing tattoo inks so i guess max package would weigh 100? i'm not sure what does tare weight and the last option meant...

     

    please help! my friend is giving me lots of headache!


  8. i've been searchign this thread but found no straight forward answer...

     

    i've installed STS 4.5.2, as mentioned earlier dynamenu should work but mine doesn't. PS, i didn't download the sts+dynamenu bundle, both contribs were downloaded seperately.

     

    anyhowz, my menu REFUSED to appear. been fiddling with the footer code. i've added the dynamenu code after the sts code in footer.php

     

    <?php
     }
    // START STS 4.1
    }
    // END STS 4.1
    
    ?>
    
    <?php
    // Output the footer for Dynamenu for osCommerce
    echo $GLOBALS['dmfooter'];
    ?>


  9. hi,

     

    Unless I have done it all wrong the radio buttons do not show up on the "lets see what we have here " page. It allows you to pick options on an item you have alredy chosen. ie on the product description.
    
    If this is wrong I would love to hear it because I will need to fix my error. 

     

    can you please explain to me what it means by "allows you to pick options on an item you have alredy chosen"? do i have to look into product_info.php?


  10. i'm encountering a huge problem here.

     

    i have installed everything nicely but somehow my options type can't appear the way i want them to. no matter what option type i put, the results is still the same old dropdown menu defaulted by oscommerce :( i can't have radio/checkboxes which defeat the purpose of me installing this feature

     

    someone please help me???

     

     

    no one can help me? i've checked with winmerge many times but i don't see any differences except some lines have an extra spacing behind the last character but i doubt it makes any differences?


  11. i believe i've been following instructions correctly...

     

    how come i can't seem to load my tinymce? there would always be this javascript error "tinymce undefined'. this is the block of code i added:

    <script language="javascript" type="text/javascript" src="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN; ?>tinymce/jscripts/tiny_mce/tiny_mce.js"></script>

    <script language="javascript" type="text/javascript">

    tinyMCE.init({

    mode : "textareas",

    theme : "advanced",

    plugins : "table,save,autosave,autosave,cleanup,advhr,advimage,advlink,emotions,iespel

    l,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu,directionalit

    y,inlinepopups,media,nonbreaking,visualchars,devkit,paste,noneditable,layer,fullp

    age,fullscreen,",

    theme_advanced_buttons1_add_before : "save,separator,",

    theme_advanced_buttons1_add : "fontselect,fontsizeselect",

    theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor",

    theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator",

    theme_advanced_buttons3_add_before : "tablecontrols,separator",

    theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print,ltr,rtl",

    theme_advanced_buttons4_add_before : "visualchars,nonbreaking,devkit,separator,layer,fullpage,fullscreen",

    table_styles : "Header 1=header1;Header 2=header2;Header 3=header3",

    table_cell_styles : "Header 1=header1;Header 2=header2;Header 3=header3;Table Cell=tableCel1",

    table_row_styles : "Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1",

    table_cell_limit : 100,

    table_row_limit : 5,

    table_col_limit : 5,

    theme_advanced_toolbar_location : "top",

    theme_advanced_toolbar_align : "left",

    theme_advanced_path_location : "bottom",

    plugin_insertdate_dateFormat : "%Y-%m-%d",

    plugin_insertdate_timeFormat : "%H:%M:%S",

    extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|v

    space|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade

    ],font[face|size|color|style],span[class|align|style]",

    external_link_list_url : "example_data/example_link_list.js",

    external_image_list_url : "example_data/example_image_list.js",

    flash_external_list_url : "example_data/example_flash_list.js"

    });

    </script>

     

    am i missing something? i've installed option type feature contrib and it doesn't work either. the only contrib that is workign is sts. :(


  12. i'm encountering a huge problem here.

     

    i have installed everything nicely but somehow my options type can't appear the way i want them to. no matter what option type i put, the results is still the same old dropdown menu defaulted by oscommerce :( i can't have radio/checkboxes which defeat the purpose of me installing this feature

     

    someone please help me???


  13. i'm not sure if i've done anythign wrong.

     

    this is what i get when i tried acessing store front: Warning: mysql_connect() [function.mysql-connect]: Access denied for user: 'nobody@localhost' (Using password: NO) in /home/seantatz/public_html/cart/includes/functions/database.php on line 19

    Unable to connect to database server!

     

    admin:Fatal error: Call to undefined function: tep_get_languages() in /home/seantatz/public_html/cart/admin/index.php on line 58

     

    i have sts installed too. did i over write files which i shouldn't have?

     

    is it safe for me to post up the codes in configure.php in both admin and cataloug in this forum for programmers to help me troubleshoot?


  14. i've encountered this major problem

     

    Warning: mysql_connect() [function.mysql-connect]: Access denied for user: 'nobody@localhost' (Using password: NO) in /home/seantatz/public_html/cart/includes/functions/database.php on line 19

    Unable to connect to database server!

     

    after i've installed this contribution. anyone wanna help me with this? i'm sure i didn't touch database.php nor did i change any passwords


  15. hi all, noob here..

     

    may i know if it's safe to use div instead of tables. from what i know most of the codings were defaulted to <table> or <tr> or <td>. i remembered there was this line of code somewhere that removes codes before the tag and adds a <td> in front.


  16. hi all thanks for the replies..

     

    downloaded v4.5.2 and had started fiddling. seems much much easy, thanks for the contribution!! :)

     

    ok more one question before i make changes, am i supposed to edit files outside sts_tempates folder (ie, the original oscommerce folder)? if i want to change the way, say, content info box, looks like, should i create a new file inside sts_templates folder that controls how it shoud look like using php? or do i have to go kill myself with the core files in my catalog folder?


  17. Hi there,

    i'm pretty newbie to php. i didn't expect oscommerce to be too difficult for my level... admin part was ok, but not the design area.

     

    i've read about sts and it seems that alot of people are using it. may i ask if it's necessary to create sites that look like these:

    http://www.shopfrock.com/shop/

    http://www.giftsnprezzys.com/

    http://shops.oscommerce.com/directory/goto,12557

     

    these sites were taken off the live shops section of oscommerce.

     

    i've tried changing and shifting the codes in index.php and this is what i get in return : www.seantatz.com/cart

    layout is one thing, i find it super troublesome to customize the left and right panel as i have to edit box class, individual info boxes and stylesheet. furthermore, i'm not sure how to use images instead of text as links.

     

    oh yeah one more thing, i've downloaded sts, and i've read from the readme file that register globals must be set to 0. are there any versions of sts that is workable with the variable set to 1?

     

    can someone please knock some sense into me before i murder my computer or drink rat poison? been stuck at this for a week, not knowing where to start or how to make a simple clean page (expected it to be easy). thanks for rescuing me! :blink:

×