Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

product_id not being assigned


Dnj1964

Recommended Posts

BS4   -    7.125

Attempting to add a new product to shop.

Admin shows that it saved the Manufacturer, Tax Class, Set Price, Products Model, and Images

Database Table Product_Description shows that it also saved the Products Description but when edit product description is blank.

Database Table Product_Description also shows product_id as 0

 

 

Link to comment
Share on other sites

6 minutes ago, JcMagpie said:

Is the product description containing any html? as this can at times cause problem's in the db.

No sir.

currently it is just a single string of text until I figure out what happened.

all the other products contain html without any problems and they aren't affected, just the ability to add products with an id and have them show on the catalog side

Link to comment
Share on other sites

Debugger shows

ReferenceError: $ is not defined[Learn More] products_new.php:584:5

<script>
    $('ul.nav li.dropdown').hover(function() {
  $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeIn(500);
}, function() {
  $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut(500);
});
</script>

 

Link to comment
Share on other sites

Product doesn't show in 'New Products' but does show when selecting the category it was placed in but does show an id of 0

product_info.php?cPath=34_38&products_id=0

Link to comment
Share on other sites

30 minutes ago, Dnj1964 said:

ReferenceError: $ is not defined[Learn More] products_new.php:584:5

Add jQuery library before your script which uses $ or jQuery so that $ can be identified in script

 

Link to comment
Share on other sites

Added

script type="text/javascript" src="/ext/responsivemenu/js/responsivemultimenu-en.js"></script>
 

into

/public_html/includes/modules/navbar_modules/templates/tpl_nb_horizontal_multi_menu.php

when I can get on my site I will try and add some products

Tracing route to 199.250.218.29 over a maximum of 30 hops

  1    <1 ms    <1 ms    <1 ms  192.168.1.1
  2     7 ms     8 ms     8 ms  10.90.128.1
  3    13 ms    12 ms    12 ms  10.0.68.57
  4    16 ms    17 ms    16 ms  10.0.18.74
  5    17 ms    14 ms    14 ms  10.0.18.33
  6    16 ms    17 ms    16 ms  4.59.214.145
  7     *        *        *     Request timed out.
  8    28 ms    31 ms    28 ms  4.79.22.110
  9     *        *        *     Request timed out.
 10     *        *        *     Request timed out.
 11    27 ms    27 ms    28 ms  199.250.218.29

 

Link to comment
Share on other sites

Ok so adding the jQuery... well at least what I added didn't do anything.

 

Added product to different category with same results.

 

No show in What's New

 

Selecting product Category or Manufacturer and product is there.

 

 

Link to comment
Share on other sites

:( let's try one at a time.

for

image.png.8c584f366432e03d1f0e10aae1cdbdaf.png

 

Edit to this, adding the ($) should fix that.

image.png.28fe05b5520535cb48ef0bfdb2f77aaa.png

Or you can remove or comment out the script

<!--<script type="text/javascript" src="ext/responsivemenu/js/responsivemultimenu-en.js"></script>-->

and the js

$('ul.nav li.dropdown').hover(function() {
$(this).find('.dropdown-menu').stop(true, true).delay(200).fadeIn(500);
}, function() {
$(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut(500);
});
</script>-->

and replace it with bootstrap 4 hover by using this,

<style>
/*bootstrap 4 css hover*/
.dropdown:hover>.dropdown-menu {
  display: block;
}   

</style>

 

Link to comment
Share on other sites

I made the changes, previously had the script commented out

29 minutes ago, JcMagpie said:

:( let's try one at a time.

for

image.png.8c584f366432e03d1f0e10aae1cdbdaf.png

 

Edit to this, adding the ($) should fix that.

image.png.28fe05b5520535cb48ef0bfdb2f77aaa.png

Or you can remove or comment out the script

<!--<script type="text/javascript" src="ext/responsivemenu/js/responsivemultimenu-en.js"></script>-->

and the js

$('ul.nav li.dropdown').hover(function() {
$(this).find('.dropdown-menu').stop(true, true).delay(200).fadeIn(500);
}, function() {
$(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut(500);
});
</script>-->

and replace it with bootstrap 4 hover by using this,

<style>
/*bootstrap 4 css hover*/
.dropdown:hover>.dropdown-menu {
  display: block;
}   

</style> 

 

And yes adding a new product to any category or sub-category the product_id is 0

Link to comment
Share on other sites

I replicated your $ error on the test site and it's a js order error adding the jquerry at the start fixed the problem on the test site.

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<script type="text/javascript" src="ext/responsivemenu/js/responsivemultimenu-en.js"></script>
<link rel="stylesheet" href="ext/responsivemenu/css/responsivemultimenu.css" type="text/css"/>

 

If the script was already commented out then I'm confused as to why it's beeing called still :( .

Replacing all the js with the bootstrap hover should also work.

 

Link to comment
Share on other sites

13 minutes ago, Dnj1964 said:

And yes adding a new product to any category or sub-category the product_id is 0

Bummer then I'm stumped as to why zero is beeing added to the new product! have you made any changes to public_html/admin/categories.php?

 

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...