Jump to content

hybmg57

Members
  • Posts

    52
  • Joined

  • Last visited

    Never

Everything posted by hybmg57

  1. Hi, In Magento... My reload price function is not working and I cannot get price to change when items are selected in the drop down box. Below are a couple of errors that I am getting. Any help would be much appreciated... The link is: http://www.playerspriority.wmetools.com/shop/index.php/pro-peptide.html optionsPrice is undefined anonymous()configurable.js (line 285) anonymous()configurable.js (line 137) anonymous()configurable.js (line 121) anonymous()prototype.js (line 214) anonymous()prototype.js (line 3974) optionsPrice.changePrice('conf...rice': price, 'oldPrice': oldPrice}); config is undefined initialize()product.js (line 550) config = undefined klass()prototype.js (line 51) pro-peptide.html()pro-peptide.html (line 599) this.productId = config.productId;
  2. Hi I need to create a leaderboard with Cakephp. There are tables already set up. They are six controllers (region) which have an add function to put data into separate tables (region). In this add function I have to check if the user's score is greater than any score in the leader board table, if so insert the new score and delete the last entry. How do I do this? If someone can help me with the code it would be greatly appreciated!
  3. Hi all, Is there a way we can show multiple columns to select when selecting belongsto values in edit.ctp view rather than just column named with "name"?
  4. Hi, I'm getting this error and I can't seem to figure it out. Can someone help me on this? Notice ( : Undefined property: LaborTracker::$Staff [APP/controllers/labor_trackers_controller.php, line 31] Code LaborTrackersController::add() - APP/controllers/labor_trackers_controller.php, line 31 Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 204 Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 171 [main] - APP/webroot/index.php, line 83 Fatal error: Call to a member function find() on a non-object in /var/www/hotel/controllers/labor_trackers_controller.php on line 31 labor_tracker.php <?php class LaborTracker extends AppModel { var $name = 'LaborTracker'; //The Associations below have been created with all possible keys, those that are not needed can be removed var $belongsTo = array( 'Staffs' => array( 'className' => 'Staffs', 'foreignKey' => 'staffs_id', 'conditions' => '', 'fields' => '', 'order' => '' ), 'Jobs' => array( 'className' => 'Jobs', 'foreignKey' => 'jobs_id', 'conditions' => '', 'fields' => '', 'order' => '' ) ); } ?> labor_trackers_controllers.php <?php class LaborTrackersController extends AppController { var $name = 'LaborTrackers'; function index() { $this->LaborTracker->recursive = 0; $this->set('laborTrackers', $this->paginate()); } function view($id = null) { if (!$id) { $this->Session->setFlash(__('Invalid labor tracker', true)); $this->redirect(array('action' => 'index')); } $this->set('laborTracker', $this->LaborTracker->read(null, $id)); } function add() { if (!empty($this->data)) { $this->LaborTracker->create(); if ($this->LaborTracker->save($this->data)) { $this->Session->setFlash(__('The labor tracker has been saved', true)); $this->redirect(array('action' => 'index')); } else { $this->Session->setFlash(__('The labor tracker could not be saved. Please, try again.', true)); } } $staffs = $this->LaborTracker->Staff->find('list'); $jobs = $this->LaborTracker->Job->find('list'); $this->set(compact('staffs', 'jobs')); } function edit($id = null) { if (!$id && empty($this->data)) { $this->Session->setFlash(__('Invalid labor tracker', true)); $this->redirect(array('action' => 'index')); } if (!empty($this->data)) { if ($this->LaborTracker->save($this->data)) { $this->Session->setFlash(__('The labor tracker has been saved', true)); $this->redirect(array('action' => 'index')); } else { $this->Session->setFlash(__('The labor tracker could not be saved. Please, try again.', true)); } } if (empty($this->data)) { $this->data = $this->LaborTracker->read(null, $id); } $staffs = $this->LaborTracker->Staff->find('list'); $jobs = $this->LaborTracker->Job->find('list'); $this->set(compact('staffs', 'jobs')); } function delete($id = null) { if (!$id) { $this->Session->setFlash(__('Invalid id for labor tracker', true)); $this->redirect(array('action'=>'index')); } if ($this->LaborTracker->delete($id)) { $this->Session->setFlash(__('Labor tracker deleted', true)); $this->redirect(array('action'=>'index')); } $this->Session->setFlash(__('Labor tracker was not deleted', true)); $this->redirect(array('action' => 'index')); } function admin_index() { $this->LaborTracker->recursive = 0; $this->set('laborTrackers', $this->paginate()); } function admin_view($id = null) { if (!$id) { $this->Session->setFlash(__('Invalid labor tracker', true)); $this->redirect(array('action' => 'index')); } $this->set('laborTracker', $this->LaborTracker->read(null, $id)); } function admin_add() { if (!empty($this->data)) { $this->LaborTracker->create(); if ($this->LaborTracker->save($this->data)) { $this->Session->setFlash(__('The labor tracker has been saved', true)); $this->redirect(array('action' => 'index')); } else { $this->Session->setFlash(__('The labor tracker could not be saved. Please, try again.', true)); } } $staffs = $this->LaborTracker->Staff->find('list'); $jobs = $this->LaborTracker->Job->find('list'); $this->set(compact('staffs', 'jobs')); } function admin_edit($id = null) { if (!$id && empty($this->data)) { $this->Session->setFlash(__('Invalid labor tracker', true)); $this->redirect(array('action' => 'index')); } if (!empty($this->data)) { if ($this->LaborTracker->save($this->data)) { $this->Session->setFlash(__('The labor tracker has been saved', true)); $this->redirect(array('action' => 'index')); } else { $this->Session->setFlash(__('The labor tracker could not be saved. Please, try again.', true)); } } if (empty($this->data)) { $this->data = $this->LaborTracker->read(null, $id); } $staffs = $this->LaborTracker->Staff->find('list'); $jobs = $this->LaborTracker->Job->find('list'); $this->set(compact('staffs', 'jobs')); } function admin_delete($id = null) { if (!$id) { $this->Session->setFlash(__('Invalid id for labor tracker', true)); $this->redirect(array('action'=>'index')); } if ($this->LaborTracker->delete($id)) { $this->Session->setFlash(__('Labor tracker deleted', true)); $this->redirect(array('action'=>'index')); } $this->Session->setFlash(__('Labor tracker was not deleted', true)); $this->redirect(array('action' => 'index')); } } ?>
×
×
  • 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.