-
Posts
170 -
Joined
-
Last visited
Posts posted by VJ
-
-
I have installed Master Products v1.1.2 with Osc 2.2ms2.
Everything is good until I found this problem.
When displaying products of specified manufacture, You can not add product to shopping cart by "buy now" button in product_listing if that manufacture has "master" or "slave" product. It will prompt that "product not found".
Anyone has the same problem?
In /catalog/index.php,
replace,
// show the products of a specified manufacturer if (isset($HTTP_GET_VARS['manufacturers_id'])) { if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only a specific category $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; } else { // We show them all $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } } else { // show the products in a given categorie if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only specific catgeory $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } else { // We show them all //Master Products $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_master, p.products_master_status, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_listing_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; //Master Products EOF } }
with,
// show the products of a specified manufacturer if (isset($HTTP_GET_VARS['manufacturers_id'])) { if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only a specific category $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_master, p.products_master_status, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; } else { // We show them all $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_master, p.products_master_status, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } } else { // show the products in a given categorie if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only specific catgeory $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_master, p.products_master_status, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } else { // We show them all //Master Products $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_master, p.products_master_status, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_listing_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; //Master Products EOF } }
Also, I've noticed the same problem in the search results. I've managed to fix by making the following change.
In /catalog/advanced_search_result.php (around line 238),
replace,
$select_str = "select distinct " . $select_column_list . " m.manufacturers_id, p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price ";
with,
$select_str = "select distinct " . $select_column_list . " m.manufacturers_id, p.products_id, pd.products_name, p.products_price, p.products_master, p.products_master_status, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price ";
What I've basically done is just add products_master and products_master_status to the sql queries.
VJ
-
In the easy polupate page
say = <http://shop.maysite.net//admin/easypopulate.php>
the links or link
Create Complete tab-delimited .txt file in temp dir
points to
file:///D|/Download/Oscommerce/EP_v2_73_MS2/catalog/admin/easypopulate.php?download=tempfile&dltype=full
Its pointing to my D drive.
Strange! Did you open/modify this file in a WYSIWYG editor like Dreamweaver? If so, I suspect that might've messed up your paths. You can try replacing it with a fresh new easypopulate.php (don't forget to backup your existing file!).
Oh and this catalog folder issue, i didn't have it and then i created one.but my store is named shop
--
$tempdir = "/catalog/temp/";
$tempdir2 = "/shop/temp/";
---
which one is correct.
If you have your store at, say, http://shop.yourdomain.com or http://www.yourdomain.com/shop, you'll most likely have to change the temp directory paths to something like,
-- $tempdir = "/shop/temp/"; /* This is what really matters */ $tempdir2 = "/catalog/temp/"; /* This is a redundant variable, as far as I can see. Maybe you can use it to backup the original path. */ ---
HTH,
VJ
-
I keep getting this when I'm trying to get into the module from adminWarning: main(includes/database_tables.php): failed to open stream: No such file or directory in /home/mdjdesig/public_html/mytotalemallcart/admin/easypopulate.php on line 157
Fatal error: main(): Failed opening required 'includes/database_tables.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mdjdesig/public_html/mytotalemallcart/admin/easypopulate.php on line 157
I'm very new to this and I just can't figure it out.
You're probably trying to get a newer EP version to work on a MS1 setup. You might find this thread here, useful.
VJ
-
Hi V.J.. This contribution is still giving me problems in my ms1 store. I have been working on this for awhile now but I can't seem to figure out how to fix the runtime errors I am getting when trying to add new categories. I installed this same contribution in my ms2 store and everything is working great. If you have any suggestions, please let me know. Thanks V.J.
I'm not really sure what those js runtime errors are about. Here's a "solution", though:
Add this code to your /admin/includes/general.js,
function rowOverEffect(object) { if (object.className == 'dataTableRow') object.className = 'dataTableRowOver'; } function rowOutEffect(object) { if (object.className == 'dataTableRowOver') object.className = 'dataTableRow'; }
... and keep your fingers crossed! :P
Next time you get a js runtime error, try to note them down or capture a screenshot.
VJ
-
-
Hello,
Are you sure you're using consistent product model numbers?
VJ
-
You'll most likely need to change this (in easypopulate.php):
// **** Temp directory **** // if you changed your directory structure from stock and do not have /catalog/temp/, then you'll need to change this accordingly. // $tempdir = "/catalog/temp/"; $tempdir2 = "/catalog/temp/";
to,
// **** Temp directory **** // if you changed your directory structure from stock and do not have /catalog/temp/, then you'll need to change this accordingly. // $tempdir = "/temp/"; $tempdir2 = "/temp/";
HTH,
VJ
-
Hello...I just installed the contribution. admin side is working great but i cant access the catalog anymore...get following error
Fatal error: Call to undefined function: tep_image() in /home/ativasat/public_html/index.php on line 13
i have ms2 with bts mod.
thank you in anticipation
Well, the links script doesn't involve changes to your index.php file, so its likely that something else has messed it up. Have you checked line 13, by the way?
VJ
-
Ah V.J. Now we have gotten a little farther. Now when I click on links, the categories are showing perfectly. However, when I click on a category, this is what comes up:
Fatal error: Cannot pass parameter 3 by reference in /hsphere/local/home/jade2001/jaamor.com/catalog/includes/modules/link_listing.php on line 20
Huh, here comes the tricky bit...
1. Copy /catalog/includes/spider.txt (if you haven't done so, earlier), and /catalog/includes/classes/split_page_results.php (rename it to split_page_results_new.php, before copying) from MS2.
2. In split_page_results_new.php, rename all instances of "splitPageResults" to "splitPageResultsNew" (you should find 2).
3. In /includes/modules/link_listing.php:
replace,
$listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'l.links_id');
with,
// split-page-results require(DIR_WS_CLASSES . 'split_page_results_new.php'); $listing_split = new splitPageResultsNew($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'l.links_id');
That should do it. Happy New Year! :)
I remember going through this routine a couple of times, before. I'd appreciate if you could compile all the changes you'd needed to make (to get this working in MS1), and post it.
VJ
-
Missing semi-colon in,
define('TABLE_ZONES', 'zones')
:)
VJ
-
Hi VJ. I used the code you supplied above and this is what my front page looked like.
Fatal error: Cannot redeclare tep_parse_input_field_data() (previously declared in /hsphere/local/home/jade2001/jaamor.com/catalog/includes/functions/general.php:154) in /hsphere/local/home/jade2001/jaamor.com/catalog/includes/functions/html_output.php on line 15
I am not sure if it mattered where I put the code. I tried a few different spots in catalog/includes/functions/general.php but same thing.
As luck would have it, my debugger won't work on the link_categories page to show you what the problem is. I am really at a loss now.
Oops, my mistake. I'd copied the function immediately above, along with tep_output_string, in my code.
Just remove this code from the one I'd posted, and you'll be fine (hopefully!).
function tep_parse_input_field_data($data, $parse) { return strtr(trim($data), $parse); }
VJ
-
I got everything installed, everything looks defined, getting this...
Parse error: parse error in /home/toners/public_html/admin/includes/database_tables.php on line 60
1146 - Table 'toners_catalog.TABLE_CONFIGURATION' doesn't exist
select configuration_key as cfgKey, configuration_value as cfgValue from TABLE_CONFIGURATION
Appears like you have stray code in your database_tables.php. Double-check the changes you've made to that file.
VJ
-
Alright, I accessed my store via the catalog, clicked on links and this is what I get
Fatal error: Call to undefined function: tep_output_string() in /hsphere/local/home/jade2001/jaamor.com/catalog/includes/functions/links.php on line 39
You can try copying the following code from your MS2 /catalog/includes/functions/general.php:
//// // Parse the data used in the html tags to ensure the tags will not break function tep_parse_input_field_data($data, $parse) { return strtr(trim($data), $parse); } function tep_output_string($string, $translate = false, $protected = false) { if ($protected == true) { return htmlspecialchars($string); } else { if ($translate == false) { return tep_parse_input_field_data($string, array('"' => '"')); } else { return tep_parse_input_field_data($string, $translate); } } }
HTH,
VJ
-
Thanks again VJ. You were right about that piece of code being in the wrong place. Everything is almost working great now expect I am getting runtime errors when I access the page admin/links_categories. When I try to add a category, and my mouse goes over that button, several runtime errors come up which I can't get rid of to add any more categories. It says runtime error on lines 191,196, and 202 - object expected. The page is admin/link_categories.php. I have no idea how to fix this. Hopefully this will be the last fix and I sincerely appreciate the time you have taken to help set this up. Any suggestions would be great.
Hmm... not sure what those errors exactly are. Maybe you could copy/paste the lines where they occur, here (if you have a Javascript debugger integrated with your browser).
VJ
P.S. - If you're keen on donating money, please PM/IM/email me. Thank you :).
-
You have probably tried to create an instance of messageStack class, before including the /includes/classes/boxes.php file (where tableBox class is defined), in your application_top.php.
Try moving the lines you'd added, AFTER the following line, in application_top.php:
// infobox require(DIR_WS_CLASSES . 'boxes.php');
HTH,
VJ
-
Hello,
An updated version of Easypopulate (v2.72) is now available for download, here.
This includes an option to turn off product attribute data when downloading the tab-delimited file.
Support for this new version will continue in this thread.
VJ
-
//include message stack class and create an instance
require(DIR_WS_Classes . 'message_stack.php');
$message_stack = new messages();
Now I am quite sure that my error is in the instance part of this. I put = new message but I really have no clue as to determine exactly what wording needs to go here. I have been changing the wording to see if I can get it to work, but so far, no luck. Any help would be great.
Good.
This should do the trick,
require(DIR_WS_CLASSES . 'message_stack.php'); $messageStack = new messageStack();
where, "messageStack" is the name of the class (in message_stack.php) and we use "$messageStack" just to be consistent with the variable name in links_submit.php.
VJ
-
Fatal error: Call to a member function on a non-object in /hsphere/local/home/jade2001/jaamor.com/catalog/links_submit.php on line 227
Would you be able to tell me what it is on line 227 that I need that I obviously don't have? I have stared at it all afternoon and searched through the files in ms2 but can't for the life of me see what I have missed. I believe it must be a file from ms2 that I need to upload. Any help would be wonderful. Thanks again.
In my links_submit.php, line 227 reads,
if ($messageStack->size('submit_link') > 0) {
You most likely have to copy the messageStack class (/catalog/includes/classes/message_stack.php) from MS2, and create an instance in /catalog/includes/application_top.php.
HTH,
VJ
-
Find the following line in /catalog/product_info.php,
$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
and replace it with something similar to,
$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pa.price_prefix, pa.options_values_price, pov.products_options_values_name");
depending on how exactly you'd like to order your atttibute choices.
HTH,
VJ
-
Hello,
If you don't find any link status text in the dropdown choices, you probably use a different default language (other than English).
To fix this, update your database using the following sql:
INSERT INTO links_status VALUES ( '1', 'N', 'Pending'); INSERT INTO links_status VALUES ( '2', 'N', 'Approved'); INSERT INTO links_status VALUES ( '3', 'N', 'Disabled');
where, N = your default language ID.
If you intend to use more than one language in your store admin, repeat this for each language ID.
HTH,
VJ
-
Hold on lol. I am actually getting an error on the links page when I click add link. It was in white and my background is white so I didn't notice it at first. Here is the error.
Fatal error: Call to a member function on a non-object in /hsphere/local/home/jade2001/jaamor.com/catalog/links_submit.php on line 227
How can I fix this? Thanks.
Oops! :o
You probably use a pre-MS2 osC version. This script is developed for MS2, but there's no reason why you can't get it working in MS1 (with a few alterations). You can find hints in previous threads (in this post) from folks who've managed to get it done. Good luck :).
VJ
-
Can you figure out why I am getting this error:
Filename: sample_output_file.txt
1064 - You have an error in your SQL syntax near 'AND cat.parent_id = 0 AND des.categories_name = 'Buecher'' at line 6
SELECT cat.categories_id FROM categories as cat, categories_description as des WHERE cat.categories_id = des.categories_id AND des.language_id = AND cat.parent_id = 0 AND des.categories_name = 'Buecher'
I did change the input locales on my computer to US format, so that the prices are displayed with the dot as a decimal seperator, not the German comma?.
BTW, when re-opening the text file in Excel, everything looks just fine...
You probably have a problem with your default language id. Check if it shows the right value.
VJ
-
I am pretty new to installing contributions so please bear with me. I followed the instructions to the letter but I am missing the sql file that I must run in mysql. Does anyone know where I can find the sql file? Thanks.
Actually, there is no seperate sql file. The sql information gets updated when you run the /catalog/links_setup.php script.
HTH,
VJ
-
That fixed the problem about adding links but now viewing them gives me this:
Fatal error: Call to undefined function: tep_output_string() in /home/bettywal/public_html/store/includes/functions/links.php on line 39
Well, the idea is to look for the missing functions in the newer osc MS2 version, and copy them over to your MS1 setup.
Just give it a shot :).
VJ
Easy Populate & Products Attributes
in General Add-Ons Support
Posted
Hello,
I have this code in place to better handle special characters, and it seems to work fine.
In file admin/easypopulate.php
replace,
with,
HTH,
VJ