Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About mongoose00318

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I got it working with this: function updateTableAfterSubmit() { table.ajax.reload( function (json){ auto_btn_height_width(); }, false ); } function auto_btn_height_width() { $('td.mfg-view-cols').each(function() { tdWidth = $(this).width(); tdHeight = $(this).height(); $(this).find('button').css({'width': tdWidth, 'height': tdHeight}); console.log(tdHeight); }); console.log($('td.mfg-view-cols').length); } Then just had to make sure I identified the right events to do call backs on. Works great now.
  2. Maybe I just need to write a jQuery function that determines the height and width of the parent td and then sets the height of each button...
  3. I could but I'd have to recode a lot and I've always found bootstraps buttons easy to use. https://stackoverflow.com/questions/53520077/css-100-height-in-a-tablecell What do you think about that?
  4. I have tried using bootstraps h-100 and w-100 to make it work as well as other things. I wont know the row height for each page so I need the buttons to fill the container TD. Why won't bootstraps h-100/w-100 classes work?
  5. Awesome man. Sorry for the delayed response and as always thanks for the thorough explanation.
  6. Masterfully done by the way. I understand most of it. Just that one part is a little confusing to me.
  7. @Barand Can you explain this part to me? return $price ? $price : 'Not set'; Isn't the first $price supposed to be the condition of the ternary operator? I'm confused as to how this statement operates.
  8. It could be a kit or a product. A kit is a collection of products which has it's own pricing. If it is a product* I will call this function...sorry about that. function determine_multi_price_product( $order_id, $product_id, $pdo ) { //get the enterprise associated with the order $query = 'SELECT enterprise FROM production_data WHERE id = :order_id'; $statement = $pdo->prepare($query); $statement->execute(['order_id' => $order_id]); if ( $statement->rowCount() > 0 ) { $enterprise = $statement->fetch()['enterprise']; //query database for a branded price for a
  9. -- -- Table structure for table `leds_prices` -- DROP TABLE IF EXISTS `leds_prices`; CREATE TABLE IF NOT EXISTS `leds_prices` ( `id` int(11) NOT NULL AUTO_INCREMENT, `product_id` int(11) DEFAULT NULL, `kit_id` int(11) DEFAULT NULL, `enterprise` text NOT NULL, `price` decimal(7,2) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=95 DEFAULT CHARSET=latin1; -- -- Dumping data for table `leds_prices` -- INSERT INTO `leds_prices` (`id`, `product_id`, `kit_id`, `enterprise`, `price`) VALUES (94, 119, NULL, 'SHRVIE', '20000.00'), (86, NULL, 48, 'SHRVIE', '78.00'), (85, NULL,
  10. I am very unfamiliar with using using variables and conditional statements with an SQL statement. Is there a way to streamline this code to make it perform all the logic I am currently doing in PHP within the query itself in the interest of streamlined code? function determine_multi_price_kit( $order_id, $kit_id, $pdo ) { //get the enterprise associated with the order $query = 'SELECT enterprise FROM production_data WHERE id = :order_id'; $statement = $pdo->prepare($query); $statement->execute(['order_id' => $order_id]); if ( $statement->rowCount() > 0 ) { $e
  11. Ohhhh....gotcha. Lol your riddle...now I understand. Yes the modal was hidden while I was piecing it all together than displaying to the user. Well, that is embarrassing...awesome thanks for the explanation.
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.