Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Quick Price Updates - official support


azer

Recommended Posts

Hi All,

I need to change one features, I need to update the price of products with this module, alredy has implemented this function, but I need change include the special price, even if possibile with one variable (true or false, in the admin panel) for enable this feature.

 

I don't have great experience with php and mysql, for this I need your help!

 

Thanks for your time and have a nice day!

 

spyrotsk.

 

Please, i need help!

Does anyone know how to do?

 

Thanks!

SpyroTSK

Link to comment
Share on other sites

  • 4 months later...
  • Replies 112
  • Created
  • Last Reply

Top Posters In This Topic

Looks like the error with

"select manufacturers_name from manufacturers where manufacturers_id="

happens when one or more products has no manufacturer assigned in DB. Is there anybody can help to make code corrections, so it will be also working without manufacturer assigned?

I have products with manufacturers and without. When the correct manufacturer chosen, everything works just fine. When "all manufacturers" chosen the "select manufacturers_name from manufacturers where manufacturers_id=" error happens.

Your help is appreciated.

 

Regards,

Oleg

Link to comment
Share on other sites

  • 4 months later...
  • 4 weeks later...
  • 1 year later...

alright, a BIG THX for this contribution, its saving me time. i have 2 questions:

 

1- how can i change the (Max. # of lines per page) by default ? its 20 lines, i want to make it 1000

2- the print button is printing the whole page, is there a way to make it print only the list of products ?

Link to comment
Share on other sites

alright, a BIG THX for this contribution, its saving me time. i have 2 questions:

 

1- how can i change the (Max. # of lines per page) by default ? its 20 lines, i want to make it 1000

2- the print button is printing the whole page, is there a way to make it print only the list of products ?

 

i figured how to set the default number of lines per page. i change "MAX_DISPLAY_SEARCH_RESULTS" to 100 or any integer number.

 

but still can't solve my 2nd problem about printing.

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 year later...

my fist issue with the Quick Update. I had just sorted by manufacturer and then sorted by item #. All went well until I wanted to chance page to work on another set. I received the following:

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by p.products_model ASC limit 21, 21' at line 1

 

select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_weight, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id from products p, products_description pd where p.products_id = pd.products_id and pd.language_id = '1' and p.manufacturers_id = 11 order by order by p.products_model ASC limit 21, 21

 

I have no idea what the syntax problem is, I'm not a programmer.

 

Help Please

Link to comment
Share on other sites

I've done a file search in admin/quick_updates.php for the "two order by" could not bring it up. Search for p.manufactures_id to look for the = 11 and could not find it.

Link to comment
Share on other sites

Try searching for "order".

 

HTH

 

G

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

searched "order" in admin/quick_update.php found 4 lines:

Line 19 - " order by tax_class_title"

Line 27 - " order by manufacturers_name"

Line 37 - " m order by m.manufacturers_name ASC"

Line 400 - $sort_by = 'order by '.$sort_by

Link to comment
Share on other sites

line 25 - 47

////Info Row pour le champ fabriquant

$manufacturers_array = array(array('id' => '0', 'text' => NO_MANUFACTURER));

$manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");

while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {

$manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'],

'text' => $manufacturers['manufacturers_name']);

}

 

// Display the list of the manufacturers

function manufacturers_list(){

global $manufacturer;

 

$manufacturers_query = tep_db_query("select m.manufacturers_id, m.manufacturers_name from " . TABLE_MANUFACTURERS . " m order by m.manufacturers_name ASC");

$return_string = '<select name="manufacturer" onchange="this.form.submit();">';

$return_string .= '<option value="' . 0 . '">' . TEXT_ALL_MANUFACTURERS . '</option>';

while($manufacturers = tep_db_fetch_array($manufacturers_query)){

$return_string .= '<option value="' . $manufacturers['manufacturers_id'] . '"';

if($manufacturer && $manufacturers['manufacturers_id'] == $manufacturer) $return_string .= ' SELECTED';

$return_string .= '>' . $manufacturers['manufacturers_name'] . '</option>';

}

$return_string .= '</select>';

return $return_string;

}

Link to comment
Share on other sites

Well it is not any of those.

 

Are you sure it is in that file

 

select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_weight, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id from products p, products_description pd where p.products_id = pd.products_id and pd.language_id = '1' and p.manufacturers_id = 11 order by order by p.products_model ASC limit 21, 21

 

What is the url displayed when the error is displayed?

 

Try looking for

 

select p.products_id, p.products_image,

 

in that file.

 

HTH

 

G

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Line 400 - $sort_by = 'order by '.$sort_by

 

Here the code ask that $sort_by gets prefixed with `order by `

 

It is likely that in some (or all) circumstances $sort_by already contains an `order by` clause, so when this line of code prefixes it with another `order by`, well it's going to break.

Edited by burt
Link to comment
Share on other sites

in admin/quick_updates found

//// select categories

if ($current_category_id == 0){

if($manufacturer){

$products_query_raw = "select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_weight, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '$languages_id' and p.manufacturers_id = " . $manufacturer . " $sort_by ";

}else{

$products_query_raw = "select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_weight, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '$languages_id' $sort_by ";

}

} else {

if($manufacturer){

$products_query_raw = "select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_weight, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc where p.products_id = pd.products_id and pd.language_id = '$languages_id' and p.products_id = pc.products_id and pc.categories_id = '" . $current_category_id . "' and p.manufacturers_id = " . $manufacturer . " $sort_by ";

}else{

 

if(tep_has_category_subcategories($current_category_id)){//if - check subcategory existence

$products_query_raw = "select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_weight, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc where p.products_id = pd.products_id and pd.language_id = '$languages_id' and p.products_id = pc.products_id and pc.categories_id IN (select categories_id from categories where parent_id = '" . $current_category_id . "') $sort_by ";

}else{

$products_query_raw = "select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_weight, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc where p.products_id = pd.products_id and pd.language_id = '$languages_id' and p.products_id = pc.products_id and pc.categories_id = '" . $current_category_id . "' $sort_by ";

}//if - check subcategory existence

}

}

 

also looked in quick_inventory.php for order, found 5

Line 90 “ p order by p.products_model”

Line 145 " m order by m.manufacturers_id"

Line 171 "%' order by p.products_model limit $limit_search_to"

Line 175 language_id = $languages_id order by p.products_model limit $limit_search_to"

Line 180 $languages_id order by p.products_model limit $limit_search_to"

Link to comment
Share on other sites

you asked

What is the url displayed when the error is displayed?

after sellecting the manufactor and sort the item # first page url:

/quick_updates.php?cPath=0&sort_by=p.products_model ASC&page=&row_by_page=21&manufacturer=11

 

next page (errors) url is:

quick_updates.php?&cPath=0&sort_by=order by p.products_model ASC&row_by_page=21&manufacturer=11&page=2

Link to comment
Share on other sites

  • 3 weeks later...
  • 11 months later...
  • 2 months later...

I have updated a few months to osc234 w/ bootstrap.  I have installed the add on Quick updates and just trying to use it for the first item.  In calling up Quick Update,  I wanted to change the (add) to the descriptions on some items.  When I clicked on update I got the following error.

Warning: mysql_query(): Access denied for user 'ladyXXXXXXXXX'@'localhost' (using password: NO) in /home/ladyXXXXXX/public_html/admxxxxxx/quick_updates.php on line 80

Warning: mysql_query(): A link to the server could not be established in /home/ladyXXXXXX/public_html/adminlb/quick_updates.php on line 80

Warning: mysql_query(): Access denied for user 'ladyXXXXXXXXX'@'localhost' (using password: NO) in /home/ladyXXXXXX/public_html/admxxxxxx/quick_updates.php on line 81

Warning: mysql_query(): A link to the server could not be established in /home/ladyXXXXXX/public_html/admxxxxxx/quick_updates.php on line 81
Quick Update

How to correct?

Link to comment
Share on other sites

It appears that this program is not ready for osCommerce 2.3.4. The errors you posted above show that it is trying to use mysql_query() when it should be using mysqli_query(). Actually it should probably be using the osCommerce database functions which would have prevented this problem.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Kymation is correct.

 

All the code directly using mysql commands need to be changed to use the osc db commands.

 

HTH

 

G

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...