Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Hi,

I have not been able to find addon for price update for bootstrapp. The one i currently use makes use of filenames.php which I belive is no longer used. Is there a price update addon that works with bootstrap that I havent found? Or is cvs the way forward with bootstrap?

 

Link to comment
Share on other sites

use the compatibility add on:

https://apps.oscommerce.com/q=compatibility

or, preferable, replace the filename constants by the real filenames:

Example: find FILENAME_CUSTOMERS and replae by 'customers.php'

just search the add-on files for terms beginning with FILENAME_ and replace all with the real filename. Don't forget to wrap them inside single quotes.

You may need to do the same for some directory constants which have been removed from admin/includes/configure.php like:

DIR_WS_IMAGES needs to be replaced by 'images/' or DIR_WS_INCLUDES replace by 'includes/'

for a complete list compare an old configure file with yours.

If you get it to work with the latest 2.3.4 EDGE, it would be great if you pack it in a new 2.3.4 EDGE compatible version and publish it. Like this others can benefit from your work :smile::thumbsup:

Link to comment
Share on other sites

16 hours ago, burt said:

I am pretty sure I coded up a nice price updating suite, I am trying to find it...

Too much code and projects and modules to sort through.

 

16 hours ago, burt said:

I am pretty sure I coded up a nice price updating suite, I am trying to find it...

Too much code and projects and modules to sort through.

Thanks, no rush as I have decided to get it all working before installing onto new servers. Working on a local host using XAMPP with latest PHP and so far so good install is working fine and I have got it about 90% as I need. One thing that i have come across is the server is giving errors on some addons , Im just ignoring for now as it not stoping me from doing what I need to do.

this is for theme changer addon

Warning: Use of undefined constant DIR_WS_ICONS - assumed 'DIR_WS_ICONS' (this will throw an Error in a future version of PHP) in

and this from payments module.

Warning: Use of undefined constant MODULE_PAYMENT_CHRONOPAY_SORT_ORDER - assumed 'MODULE_PAYMENT_CHRONOPAY_SORT_ORDER' (this will throw an Error in a future version of PHP) in

 

Link to comment
Share on other sites

17 hours ago, raiwa said:

use the compatibility add on:

https://apps.oscommerce.com/q=compatibility

or, preferable, replace the filename constants by the real filenames:

Example: find FILENAME_CUSTOMERS and replae by 'customers.php'

just search the add-on files for terms beginning with FILENAME_ and replace all with the real filename. Don't forget to wrap them inside single quotes.

You may need to do the same for some directory constants which have been removed from admin/includes/configure.php like:

DIR_WS_IMAGES needs to be replaced by 'images/' or DIR_WS_INCLUDES replace by 'includes/'

for a complete list compare an old configure file with yours.

If you get it to work with the latest 2.3.4 EDGE, it would be great if you pack it in a new 2.3.4 EDGE compatible version and publish it. Like this others can benefit from your work :smile::thumbsup:

OK have done all the changes as stated above but its now showing lots of new errors of this type! Do I need to define these an if so in which file.

Warning: Use of undefined constant ACTIVATE_COMMERCIAL_MARGIN - assumed 'ACTIVATE_COMMERCIAL_MARGIN' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\public_html\********\quick_updates.php on line 309

 

Link to comment
Share on other sites

1 hour ago, justcatering said:

quick_updates.php on line 309

My guess...this file but I don't use it so I can't check it for you.

Dan

Link to comment
Share on other sites

5 minutes ago, Dan Cole said:

My guess...this file but I don't use it so I can't check it for you.

Dan

No Dan it was me just being stupid. Its been nearly 15 years since I did any coding and it shows! I had failed to add the new tables to the database.

 

Link to comment
Share on other sites

15 minutes ago, justcatering said:

OK got the basic code working but need some help with output. The code has changed the page layout totaly! I assume I have missed somthing but not sure what.

It it breaks the layout only on that page, you probably need to add the lines which include the template_top.php and template_bottom.php to the page file. Compare with a core page file.

Link to comment
Share on other sites

OK the files were missing so added them to top of file. Now page displays as it should but table is gone and new error, very strange why woulld price update link to payapl?

Fatal error: Cannot redeclare app_paypal_get_admin_box_links() (previously declared in C:\xampp\htdocs\public_html\includes\apps\paypal\admin\functions\boxes.php:15) in C:\xampp\htdocs\public_html\includes\apps\paypal\admin\functions\boxes.php on line 49

 

Link to comment
Share on other sites

OK fixed last problem but now,

Warning: Use of undefined constant HTML_PARAMS - assumed 'HTML_PARAMS' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\public_html\admin8262\includes\template_top.php on line 14
HTML_PARAMS>

 

Link to comment
Share on other sites

Compare the page file with a core page file. There may be unneeded code left which is now in template_top.php.

Link to comment
Share on other sites

After some testing display is stabel and prices update but I am geting errors in other files such as ,

Warning: sizeof(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\public_html\admin8262\categories.php on line 976

Fatal error: Uncaught Error: Call to undefined function mysql_query() in C:\xampp\htdocs\public_html\admin8262\quick_updates.php:126 Stack trace: #0 {main} thrown in C:\xampp\htdocs\public_html\admin8262\quick_updates.php on line 126

Fatal error: Uncaught Error: Call to undefined function mysql_query() in C:\xampp\htdocs\public_html\admin8262\quick_updates.php:117 Stack trace: #0 {main} thrown in C:\xampp\htdocs\public_html\admin8262\quick_updates.php on line 117

 

 

Link to comment
Share on other sites

Line 121--        if($HTTP_POST_VARS['product_new_quantity']){
Line 122--               foreach($HTTP_POST_VARS['product_new_quantity'] as $id => $new_quantity) {
Line 123--                      if ($HTTP_POST_VARS['product_new_quantity'][$id] != $HTTP_POST_VARS['product_old_quantity'][$id]) {

Line 124--                         $count_update++;
Line 125--                         $item_updated[$id] = 'updated';

Line 126--            mysql_query("UPDATE " . TABLE_PRODUCTS . " SET products_quantity=$new_quantity, products_last_modified=now() WHERE products_id=$id");

 

Link to comment
Share on other sites

line 126 replace mysql_query by the function tep_db_query. You should replace all native mysql funtions by their oscommerce equivalent. Have a look into includes/functions/database.php to find out.

Link to comment
Share on other sites

You can easy find answers to these generic questions in Google.

You need to wrap a delimiter around the regex sequence, usually forward slash, but can be anything else which is not used in the regex rule itself.

Post the complete code to give you a concrete solution.

Link to comment
Share on other sites

should be:

if ($sort_by && !preg_match('/order by/',$sort_by)) $sort_by = 'order by '.$sort_by ; 

https://stackoverflow.com/questions/2217850/how-to-replace-ereg

but I think you do not need preg_match in that case. A simple  strpos($sort_by, 'order_by')=== false should do it and is faster.

http://php.net/manual/en/function.strpos.php

Link to comment
Share on other sites

you should still check if $sort_by  is defined: if( $sort_by && ....

or better if(isset($sort_by ) &&.....

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...