Results 1 to 2 of 2
  1. #1
    Join Date
    May 2009
    Posts
    1
    Plugin Contributions
    0

    red flag Minimun price per category or per manufacturer

    Hi I am using the latest Zencart, I am very close to finish the site but can't resolve this.

    I need that the zen-cart have a minimum price PER CATEGORY or PER MANUFACTURER, because my categories are the name of the manufacturers.

    Actually I'm using the module Minimum Order from http://www.zen-cart.com/index.php?ma...roducts_id=599

    But this module only allows to put a minimum price for the order total. I thought long ways to avoid need this but isn't possible, so I decided to create the module or modify the module "Minimum Order".

    Can you help me?

    I think that to modify the module Minimum Order i will have to modify the file class.minimum_order_amount.php :

    Code:
    <?php
    /**
     * class.minimum_order_amount.php
     *
     * @copyright Copyright 2005-2007 Andrew Berezin eCommerce-Service.com
     * @copyright Portions Copyright 2003-2006 Zen Cart Development Team
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: config.minimum_order_amount.php 1.0.1 20.09.2007 0:06 AndrewBerezin $
     */
    
    /**
     * Observer class used to check minimum order amount
     *
     */
    class minimum_order_amount extends base {
      /**
       * constructor method
       *
       * Attaches our class to the ... and watches for 4 notifier events.
       */
      function minimum_order_amount() {
        global $zco_notifier;
    //      $_SESSION['cart']->attach($this, array('NOTIFIER_CART_GET_PRODUCTS_START', 'NOTIFIER_CART_GET_PRODUCTS_END'));
        $zco_notifier->attach($this, array('NOTIFY_HEADER_END_SHOPPING_CART', 'NOTIFY_HEADER_START_CHECKOUT_SHIPPING', 'NOTIFY_HEADER_START_CHECKOUT_PAYMENT', 'NOTIFY_HEADER_START_CHECKOUT_CONFIRMATION'));
      }
      /**
       * Update Method
       *
       * Called by observed class when any of our notifiable events occur
       *
       * @param object $class
       * @param string $eventID
       */
      function update(&$class, $eventID) {
        global $messageStack;
        global $currencies;
        switch ($eventID) {
          case 'NOTIFIER_CART_GET_PRODUCTS_END':
          case 'NOTIFY_HEADER_END_SHOPPING_CART':
            if ($_SESSION['cart']->count_contents() > 0 && MIN_ORDER_AMOUNT > 0) {
              if($_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT) {
                $_SESSION['valid_to_checkout'] = false;
                $messageStack->add('shopping_cart', sprintf(TEXT_ORDER_UNDER_MIN_AMOUNT, $currencies->format(MIN_ORDER_AMOUNT)) . '<br />', 'caution');
              }
            }
            break;
          case 'NOTIFY_HEADER_START_CHECKOUT_SHIPPING':
          case 'NOTIFY_HEADER_START_CHECKOUT_PAYMENT':
          case 'NOTIFY_HEADER_START_CHECKOUT_CONFIRMATION':
            if ($_SESSION['cart']->count_contents() > 0 && MIN_ORDER_AMOUNT > 0) {
              if($_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT) {
                zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
              }
            }
            break;
          default:
            break;
        }
      }
    }
    ?>
    Really I don't know what to do after this. I really would appreciate your help.

    Sorry for my english, i'm from Argentina.

    PD: If the moderators think that the post isn't in the right place please move it to the correct place.

  2. #2
    Join Date
    Nov 2009
    Location
    Chennai, India
    Posts
    50
    Plugin Contributions
    3

    Default Re: Minimun price per category or per manufacturer

    Have you found a solution for it?
    Balaji R

 

 

Similar Threads

  1. v154 Price per kilo/each/per metre etc
    By blackerutuf in forum General Questions
    Replies: 3
    Last Post: 23 Feb 2015, 07:46 PM
  2. attributes per final price and not per product
    By oberheimer in forum Setting Up Categories, Products, Attributes
    Replies: 19
    Last Post: 6 Apr 2014, 07:58 PM
  3. v139h Per unit/per category/per location shipping rates
    By jsavoie in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 4 Nov 2012, 06:19 PM
  4. Price per item plus per order - how?
    By one tall man in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 20 Feb 2012, 03:09 PM
  5. Price units, per foot, per pound, each, etc...
    By vfrazier in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 3 Nov 2008, 10:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg