VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Downloads for Sale for VirtueMart

IMPORTANT ANNOUNCEMENT: Plugin development ceased, all plugins made available freely (GPL)

With great sadness we have to announce that we are ceasing development of all our VirtueMart, WooCommerce and Joomla plugins. Effective immediately, all our plugins -- even those that were paid downloads -- are made available for free from our homepage (GPL license still applies), but we cannot and will not provide any support anymore.

It has been a great pleasure to be part of the thriving development communities of VirtueMart as well as WooCommerce. However, during the last year it became painstakingly clear that in addition to a full-time job, a young family and several other time-consuming hobbies at professional level (like being a professional singer) the plugin development and the support that it requires is not sustainable and is taking its toll. It has been an honor, but it is now time to say good bye!

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Coupons and Virtuemart 11 Sep 2013 03:47 #1

  • subaqueous
  • subaqueous's Avatar Topic Author
  • Offline
  • Posts: 4
TO get the Coupon's and Paypal to work for free orders I had to use a custom script. Basiclly if I do not then virtuemart will always put it in "pending" With the script it will make the order "completed"

So here is the original:

in www/components/com_virtuemart/helpers/cart.php,
around line 943 is this function
<?php
    private function confirmedOrder() {
       

//Just to prevent direct call
        if ($this->_dataValidated && $this->_confirmDone) {
           

$orderModel = VmModel::getModel('orders');
            if ((

$orderID = $orderModel->createOrderFromCart($this)) === false) {
                $mainframe = JFactory::getApplication();
                JError::raiseWarning(500, 'No order created '.$orderModel->getError());
                $mainframe->redirect(JRoute::_('index.php?option=com_virtuemart&view=cart') );
            }
            $this->virtuemart_order_id = $orderID;
            $order= $orderModel->getOrder($orderID);
           

$dispatcher = JDispatcher::getInstance();
           

JPluginHelper::importPlugin('vmshipment');
            JPluginHelper::importPlugin('vmcustom');
            JPluginHelper::importPlugin('vmpayment');
            $returnValues = $dispatcher->trigger('plgVmConfirmedOrder', array($this, $order));
            // may be redirect is done by the payment plugin (eg: paypal)
            // if payment plugin echos a form, false = nothing happen, true= echo form ,
            // 1 = cart should be emptied, 0 cart should not be emptied
       

}
    }

?>

Here is the custom:
<?php
    private function confirmedOrder() {
       

//Just to prevent direct call
        if ($this->_dataValidated && $this->_confirmDone) {
           

$orderModel = VmModel::getModel('orders');
            if ((

$orderID = $orderModel->createOrderFromCart($this)) === false) {
                $mainframe = JFactory::getApplication();
                JError::raiseWarning(500, 'No order created '.$orderModel->getError());
                $mainframe->redirect(JRoute::_('index.php?option=com_virtuemart&view=cart') );
            }
            $this->virtuemart_order_id = $orderID;
            $order= $orderModel->getOrder($orderID);
           

$dispatcher = JDispatcher::getInstance();
           

JPluginHelper::importPlugin('vmshipment');
            JPluginHelper::importPlugin('vmcustom');
            JPluginHelper::importPlugin('vmpayment');
            $returnValues = $dispatcher->trigger('plgVmConfirmedOrder', array($this, $order));
            // may be redirect is done by the payment plugin (eg: paypal)
            // if payment plugin echos a form, false = nothing happen, true= echo form ,
            // 1 = cart should be emptied, 0 cart should not be emptied
       

}
    }

?>

Problem is with the script on it will then trigger a problem with Download for sale. It will say "TCPDF ERROR: [Image] Unable to get image: www.subaqueousmusic.com/plugins/vmcustom.../download_medium.png "

Not sure why it says that. I checked and that file is exactly where it needs to be.

What is happening here?

Please Log in or Create an account to join the conversation.

Coupons and Virtuemart 17 Sep 2013 02:28 #2

The problem is that the TCPDF library that is used by VirtueMart to create the PDF invoices from the HTML code does not properly support png images (e.g. the vendor logo also need to be a jpeg...). The TCPDF library will simply fail and print out that strange message.

Reinhold

Please Log in or Create an account to join the conversation.

  • Page:
  • 1

VM - Shopping cart

 x 

Cart empty

Login Formular