Trying to add uc_cart menu path that calls function, but gets 'page not found' error instead

Events happening in the community are now at Drupal community events on www.drupal.org.
paullwolborsky's picture

Hi,

I am designing a construction materials registry database, and the e-commerce portion automatically assigns an assessment fee to each product, and each environmental claim made about the product.

This requires serious customization of Ubercart:
- Item added automatically when you create a product and claims, removed when product/claim deleted
- Title forced to show name of served product/claims rather than the product itself, which is an assessment fee.
- Product only actual line item, with multiple claims stored inside it
- Cart draws products/claims from permanent repository. Items can be 'removed' from cart and cart rebuilt everytime you click on link to view cart

The last item is my problem. When you create a cart, normally, the function uc_cart_get_contents gets filled when you press add-to-cart. I added code to draw select..insert data from another table, and I want to make that happen only when you press a cart link I will title 'refresh cart'. Then, I added this to the list of menu items, beneath the original 'cart' entry...

$items[] = array(
  'path' => 'cart/build',
  'title' => t('Rebuild Shopping cart'),
  'description' => t('Rebuild, then View/modify the contents of your shopping cart or proceed to checkout.'),
  'page callback' => 'uc_cart_view',
  'page callback arguments' => array('rebuild'),
  'access' => user_access('access content'),
  'type' => MENU_CALLBACK,
);

The only difference between this and the cart entry is the path and addition of a callback argument. So far, so good, right?

When I click on the link with path cart/build, I get a page not found error. This isn't a page call, just a menu item. What am I missing?

Thank you.
Paul Wolborsky
Santa Clara

dev site-> http://www.chpsregistry.com/devtwo/drupal

Silicon Valley Drupal

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: