Jump to content

importhookup

Members
  • Content count

    23
  • Joined

  • Last visited

Profile Information

  • Real Name
    John Ken
  1. importhookup

    Actual Attribute Price V1.0

    I discovered more problems :( When I look in the shopping cart, each individual items listed will show the base price + 2X the attribute value. The subtotal on the other hand, is showing the correct value. However, at the final checkout the final price is the sum of all the base price + 2X the attribute value again! :angry: Sigh... if someone can please help me solve this problem I would greatly appreciate it.
  2. importhookup

    Actual Attributes total

    Hi Al, It seems like you got the problem fixed. I still have the same problem BUT the doubling of the price actaully happens with the attribute. So if I buy a product that's $100 with a $20 attribute, the sum of the product will show up to be $140. Can someon help me here?
  3. importhookup

    Actual Attribute Price V1.0

    Eveyrthing aside with Esay Populate... I'm having problems with my shopping cart which is showing the base price + double the value of the attribute. For example, if hte base price is $100 and the attribute value is +20, the item in the cart would show $140. Can someone please show me how to fix this problem??
  4. importhookup

    Easy Populate & Products Attributes

    Hi Mibble, Thanks for pointing that out for me. After playing with it for a while I was finally able to figure out what is wrong. Sucks to be an amateur programmer ;) Can you take a look at this for me if you have a chance? I've spent hours trying to figure this out but it just isn't working right for me. http://forums.oscommerce.com/index.php?showtopic=115021
  5. importhookup

    Easy Populate & Products Attributes

    Hi Mibble, Thasnks for the quick response. I really don't understand this becuase I'm only getting the message when EP is trying to insert a product that doesn't already exist in the database. For example, the R-20 already exists so it reads it in fine, but the R-13 and the R-20X will thorw the error. Then I went ahead and manually created a R-20X in the admin control panel, then I ran EP again and I was able to get the R-20X inserted fine. Here's the code: File uploaded. Temporary filename: /var/tmp/phpneSC2i User filename: Raze Wheels upload test.txt Size: 9432 | razer20 | raze_120.g | Raze R-20 | | | 136 | 25 | | 10/5/2004 | 100 | 1 | Wheel Colo | 3 | | Silver | 4 | | Metallic S | 5 | | Metallic S | 6 | | Hypersilve | 7 | 10 | Hyperblack | 8 | | Gunmetal w | 9 | | Gold with | 10 | | Gold with | 11 | 0 | Gold | 12 | | Flat Black | 2 | Wheel Size | 1 | 136 | 17x7.0 | 2 | 184 | 18x7.5 | 3 | Wheel Offs | 13 | | 35 | 14 | | 40 | 15 | | 42 | 16 | | 43 | 4 | Bolt Patte | 17 | 0 | 4x100 | 18 | | 4x114.3 | 19 | | 5x100 | 20 | 0 | 5x114.3 | 21 | | 8x100 | 22 | | 8x114.3 | 23 | | 10x100 | 24 | | 10x114.3 | Raze Wheel | 170 | Wheels | Sport Comp | | Taxable Go | Active Updated | razer20x | raze_120.g | Raze R-20x | | | 136 | 25 | | 10/5/2004 | 100 | 1 | Wheel Colo | 3 | | Silver | 4 | | Metallic S | 5 | | Metallic S | 6 | | Hypersilve | 7 | 10 | Hyperblack | 8 | | Gunmetal w | 9 | | Gold with | 10 | | Gold with | 11 | 0 | Gold | 12 | | Flat Black | 2 | Wheel Size | 1 | 136 | 17x7.0 | 2 | 184 | 18x7.5 | 3 | Wheel Offs | 13 | | 35 | 14 | | 40 | 15 | | 42 | 16 | | 43 | 4 | Bolt Patte | 17 | 0 | 4x100 | 18 | | 4x114.3 | 19 | | 5x100 | 20 | 0 | 5x114.3 | 21 | | 8x100 | 22 | | 8x114.3 | 23 | | 10x100 | 24 | | 10x114.3 | Raze Wheel | 170 | Wheels | Sport Comp | | Taxable Go | Active Updated | razer13 | raze_120.g | Raze R-13 | | | 130 | 25 | | 10/3/2004 | 100 | 1 | Wheel Colo | 3 | 0 | Silver | 4 | | Metallic S | 5 | | Metallic S | 6 | | Hypersilve | 7 | 20 | Hyperblack | 8 | | Gunmetal w | 9 | | Gold with | 10 | | Gold with | 11 | | Gold | 12 | | Flat Black | 2 | Wheel Size | 1 | 130 | 17x7.0 | 2 | 200 | 18x7.5 | 3 | Wheel Offs | 13 | | 35 | 14 | | 40 | 15 | | 42 | 16 | | 43 | 4 | Bolt Patte | 17 | | 4x100 | 18 | | 4x114.3 | 19 | | 5x100 | 20 | | 5x114.3 | 21 | 0 | 8x100 | 22 | 0 | 8x114.3 | 23 | 0 | 10x100 | 24 | 0 | 10x114.3 | Raze Wheel | 158 | Wheels | Sport Comp | | Taxable Go | Active !New Product! 1136 - Column count doesn't match value count at row 1 INSERT INTO products ( products_retail_price, products_image, products_model, products_price, products_status, products_last_modified, products_date_added, products_date_available, products_tax_class_id, products_weight, products_quantity, manufacturers_id) VALUES ( 'raze_120.gif', 'razer13', '130', '1', CURRENT_TIMESTAMP, "10/3/2004 21:53", NULL, '1', '25', '100', '158' '14')
  6. importhookup

    Easy Populate & Products Attributes

    Can someone please help me out with this error message? "1136 - Column count doesn't match value count at row 1 I'm ONLY getting these on the items (rows) that I try to import that does not already exist in the database. Any help is appreciated. I also have a question regarding the update of the attribute prefixes. If any of you can have a look at it it would really help me out a lot. It's posted here http://forums.oscommerce.com/index.php?showtopic=115021. Thanks.
  7. Hi, I'm trying to modify the code for Easy Populate so it will work with Actaul Attribute. All Actaul Attribute is is that if you have a blank attribute prefix (vs. '-' or '+'), it will show the actaul value of the attribute in the shopping cart vs. showing the difference. For example, if I have Product A which is $10. I can either have an attribute for Base Product A Version 2.0 for $2 (w/ prefix '+') or i can directly enter $12 (w/ prefix ''). //left blank I'm using Easy Populate to enter in all the attributes and attribute values, and my solution to see whether or not we should have "+", "-", or "" (blank) is to simply check whether the attribute value is higher than the product price. If it is higher than we will simply leave the attribute prefix blank because we will assume that is the actual price of the product. If the attribute price is between $0 and it is less than the actaul product price, then we will put a a "+" on there becuase we know that this is the additonal price that you have to pay aside from the base price. //original code $attribute_values_price_prefix = ($$v_attribute_values_price_var < 0) ? '-' : '+'; //My Code: sets the attribute prefix to '-' if the value price of the attribute value is less than 0 if($$v_attribute_values_price_var < 0) {$attribute_value_price_prefix = '-';} //My Code: sets the attribute price prefix to + if the value price is less than the actaul price else if($$v_attribute_values_price_var >= $v_products_price) {$attribute_value_price_prefix = '';} //My Code: sets the attribute prefix to '' if the value price of the attribute is greater or equal to the actaul price else {$attribute_values_price_prefix = '+';} Can someone pleaes help me out here? I think it's the middle line that is "else if" statement that is causing the problem. is "$v_products_price" the right variable to compare the attribute price to? Please advise. Thanks for your time!
  8. importhookup

    Actual Attribute Price V1.0

    Hi Thoraxe, Thanks for getting back to me. After reading all the information that came with the download I realized that I had all my questions answered. I'm still quite new to oscommerce so I'm finally getting a hang of how things work around here. Thanks for being so patient and answering my questions. This is a great mod BTW, especially for people who get a list of items from their distributors in excel format. For example, you can run excel and get a list of prices at 10% (*.90) and enter that number in the attribute rather than finding the difference amongst the items. Below is the code from Easy Attribute (great contribution btw). I'm going to take a look at it and see if I'm able to modify it to wrok with actual attribute price. // VJ product attribs begin if (isset($v_attribute_options_id_1)){ $attribute_rows = 1; // master row count $languages = tep_get_languages(); // product options count $attribute_options_count = 1; $v_attribute_options_id_var = 'v_attribute_options_id_' . $attribute_options_count; while (isset($$v_attribute_options_id_var) && !empty($$v_attribute_options_id_var)) { // remove product attribute options linked to this product before proceeding further // this is useful for removing attributes linked to a product $attributes_clean_query = "delete from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$v_products_id . "' and options_id = '" . (int)$$v_attribute_options_id_var . "'"; tep_db_query($attributes_clean_query); $attribute_options_query = "select products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id = '" . (int)$$v_attribute_options_id_var . "'"; $attribute_options_values = tep_db_query($attribute_options_query); // option table update begin if ($attribute_rows == 1) { // insert into options table if no option exists if (tep_db_num_rows($attribute_options_values) <= 0) { for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $lid = $languages[$i]['id']; $v_attribute_options_name_var = 'v_attribute_options_name_' . $attribute_options_count . '_' . $lid; if (isset($$v_attribute_options_name_var)) { $attribute_options_insert_query = "insert into " . TABLE_PRODUCTS_OPTIONS . " (products_options_id, language_id, products_options_name) values ('" . (int)$$v_attribute_options_id_var . "', '" . (int)$lid . "', '" . $$v_attribute_options_name_var . "')"; $attribute_options_insert = tep_db_query($attribute_options_insert_query); } } } else { // update options table, if options already exists for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $lid = $languages[$i]['id']; $v_attribute_options_name_var = 'v_attribute_options_name_' . $attribute_options_count . '_' . $lid; if (isset($$v_attribute_options_name_var)) { $attribute_options_update_lang_query = "select products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id = '" . (int)$$v_attribute_options_id_var . "' and language_id ='" . (int)$lid . "'"; $attribute_options_update_lang_values = tep_db_query($attribute_options_update_lang_query); // if option name doesn't exist for particular language, insert value if (tep_db_num_rows($attribute_options_update_lang_values) <= 0) { $attribute_options_lang_insert_query = "insert into " . TABLE_PRODUCTS_OPTIONS . " (products_options_id, language_id, products_options_name) values ('" . (int)$$v_attribute_options_id_var . "', '" . (int)$lid . "', '" . $$v_attribute_options_name_var . "')"; $attribute_options_lang_insert = tep_db_query($attribute_options_lang_insert_query); } else { // if option name exists for particular language, update table $attribute_options_update_query = "update " . TABLE_PRODUCTS_OPTIONS . " set products_options_name = '" . $$v_attribute_options_name_var . "' where products_options_id ='" . (int)$$v_attribute_options_id_var . "' and language_id = '" . (int)$lid . "'"; $attribute_options_update = tep_db_query($attribute_options_update_query); } } } } } // option table update end // product option values count $attribute_values_count = 1; $v_attribute_values_id_var = 'v_attribute_values_id_' . $attribute_options_count . '_' . $attribute_values_count; while (isset($$v_attribute_values_id_var) && !empty($$v_attribute_values_id_var)) { $attribute_values_query = "select products_options_values_name from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_id = '" . (int)$$v_attribute_values_id_var . "'"; $attribute_values_values = tep_db_query($attribute_values_query); // options_values table update begin if ($attribute_rows == 1) { // insert into options_values table if no option exists if (tep_db_num_rows($attribute_values_values) <= 0) { for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $lid = $languages[$i]['id']; $v_attribute_values_name_var = 'v_attribute_values_name_' . $attribute_options_count . '_' . $attribute_values_count . '_' . $lid; if (isset($$v_attribute_values_name_var)) { $attribute_values_insert_query = "insert into " . TABLE_PRODUCTS_OPTIONS_VALUES . " (products_options_values_id, language_id, products_options_values_name) values ('" . (int)$$v_attribute_values_id_var . "', '" . (int)$lid . "', '" . $$v_attribute_values_name_var . "')"; $attribute_values_insert = tep_db_query($attribute_values_insert_query); } } // insert values to pov2po table $attribute_values_pov2po_query = "insert into " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " (products_options_id, products_options_values_id) values ('" . (int)$$v_attribute_options_id_var . "', '" . (int)$$v_attribute_values_id_var . "')"; $attribute_values_pov2po = tep_db_query($attribute_values_pov2po_query); } else { // update options table, if options already exists for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $lid = $languages[$i]['id']; $v_attribute_values_name_var = 'v_attribute_values_name_' . $attribute_options_count . '_' . $attribute_values_count . '_' . $lid; if (isset($$v_attribute_values_name_var)) { $attribute_values_update_lang_query = "select products_options_values_name from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_id = '" . (int)$$v_attribute_values_id_var . "' and language_id ='" . (int)$lid . "'"; $attribute_values_update_lang_values = tep_db_query($attribute_values_update_lang_query); // if options_values name doesn't exist for particular language, insert value if (tep_db_num_rows($attribute_values_update_lang_values) <= 0) { $attribute_values_lang_insert_query = "insert into " . TABLE_PRODUCTS_OPTIONS_VALUES . " (products_options_values_id, language_id, products_options_values_name) values ('" . (int)$$v_attribute_values_id_var . "', '" . (int)$lid . "', '" . $$v_attribute_values_name_var . "')"; $attribute_values_lang_insert = tep_db_query($attribute_values_lang_insert_query); } else { // if options_values name exists for particular language, update table $attribute_values_update_query = "update " . TABLE_PRODUCTS_OPTIONS_VALUES . " set products_options_values_name = '" . $$v_attribute_values_name_var . "' where products_options_values_id ='" . (int)$$v_attribute_values_id_var . "' and language_id = '" . (int)$lid . "'"; $attribute_values_update = tep_db_query($attribute_values_update_query); } } } } } // options_values table update end // options_values price update begin $v_attribute_values_price_var = 'v_attribute_values_price_' . $attribute_options_count . '_' . $attribute_values_count; if (isset($$v_attribute_values_price_var) && ($$v_attribute_values_price_var != '')) { $attribute_prices_query = "select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$v_products_id . "' and options_id ='" . (int)$$v_attribute_options_id_var . "' and options_values_id = '" . (int)$$v_attribute_values_id_var . "'"; $attribute_prices_values = tep_db_query($attribute_prices_query); //tim's attribute value fix $attribute_values_price_prefix = ($$v_attribute_values_price_var < 0) ? '-' : '+'; // options_values_prices table update begin // insert into options_values_prices table if no price exists if (tep_db_num_rows($attribute_prices_values) <= 0) { $attribute_prices_insert_query = "insert into " . TABLE_PRODUCTS_ATTRIBUTES . " (products_id, options_id, options_values_id, options_values_price, price_prefix) values ('" . (int)$v_products_id . "', '" . (int)$$v_attribute_options_id_var . "', '" . (int)$$v_attribute_values_id_var . "', '" . (float)$$v_attribute_values_price_var . "', '" . $attribute_values_price_prefix . "')"; $attribute_prices_insert = tep_db_query($attribute_prices_insert_query); } else { // update options table, if options already exists $attribute_prices_update_query = "update " . TABLE_PRODUCTS_ATTRIBUTES . " set options_values_price = '" . $$v_attribute_values_price_var . "', price_prefix = '" . $attribute_values_price_prefix . "' where products_id = '" . (int)$v_products_id . "' and options_id = '" . (int)$$v_attribute_options_id_var . "' and options_values_id ='" . (int)$$v_attribute_values_id_var . "'"; $attribute_prices_update = tep_db_query($attribute_prices_update_query); } } // options_values price update end $attribute_values_count++; $v_attribute_values_id_var = 'v_attribute_values_id_' . $attribute_options_count . '_' . $attribute_values_count; } $attribute_options_count++; $v_attribute_options_id_var = 'v_attribute_options_id_' . $attribute_options_count; } $attribute_rows++; } // VJ product attribs end } else { // this record was missing the product_model array_walk($items, 'print_el'); echo "<p class=smallText>No products_model field in record. This line was not imported <br>"; echo "<br>"; } // end of row insertion code }
  9. importhookup

    Actual Attribute Price V1.0

    Hi Thoraxe, Thanks for asnwering my question. So let me confirm this... the Actual Attribute Price V1.0 will allow the admin of the store to enter in the actual price of the product along with the attribute right? I checked out your website (nice site BTW) and I can see that from the customer's point of view if a digital camera is $200 and the digital camera with an additional battery is $230. What I want to confirm is that when the admins does enter the product, instead of entering the base price and the difference of $30 in the attribute section you can just enter in $230 right? Another questly I have is will this work with Easy Populate? Lastly, how does this mod affect the existing products in the store?
  10. importhookup

    Easy Populate & Products Attributes

    I've searched this forum for the last 1 and 1/2 hours and I haven't been able to find a solution for this, so please help me out. Right now EP is running great for us. However, I cannot get the prooduct info to upload correctly. We can download the tables and all the product information just fine but when we upload it, a lot of characters change. Here's an example: <TABLE borderColor=#00039a cellSpacing='Ŕ"' cellPadding='Ŕ"' width='61' bgColor=#0ff6f0 border='ŕ"' collapse"><!--DWLayoutTable--> <TBODY> <TR> <TD vAlign='"top"' borderColor=#0a0 width='61' height='൯"'><FONT face='"Verdana,' size='Ŗ"' Notice that all the numbers and the quotes are just going crazy. I even have the escape character settings set to false // **** Quote -> Escape character conversion **** // If you have extensive html in your descriptions and it's getting mangled on upload, turn this off // set to 1 = replace quotes with escape characters // set to 0 = no quote replacement global $replace_quotes; $replace_quotes = false; Can someone please help me with this. Thanks a lot!
  11. importhookup

    Actual Attribute Price V1.0

    From my understanding we still have to have a base price $X, and if you have 2 attributes you would have variables $A and $B. Let's say $X = 5.00, $A = 2.00 and $B=3.00 With this contribution installed, the shoppers wouls see: 5.00 7.00 8.00 Whereas w/o the contribution it will show: 5.00 +2.00 +3.00 My question is whether or not we can enter the actual value of the product with a certain attribute rather than the difference. ALso, would this work with Easy Populate?
  12. importhookup

    [Contribution] Adding new fields to Easy Populate

    I just followed all the directions to add the products_retail_price field. After testing it I found out that the information doesn't get downloaded. Then I entered in some sample retail prices and that doesn't get uploaded.... any idea why this would happen and how I can fix this? Thanks.
  13. importhookup

    Vendor Locator Displayed by Distance

    Hi Hobbzilla, This is a great contribution :) I was wondering if there were any other fixes that were made after February 24th, 2004. Thanks a lot, I'm really looking forward to installing this contribution. Tim
  14. importhookup

    OSC-Affiliate

    Hi guys, I'm having slight trouble with displaying banners with OSC affiliate. Text links work fine, however the banner images are not displaying correctly for banner links. Below is a screenshot: I'd appreciate any help or advice on fixing this problem. Thanks.
×