News:

Looking for documentation? Take a look on our wiki

Main Menu

CustomFields with Stocks no recalculate as expected

Started by jlbarkas, September 24, 2012, 18:47:32 PM

Previous topic - Next topic

jlbarkas

Hi all.

I am working with virtuemart2 (and joomla 1.5);  when I add a custom field that controls the stock, the frontend virtuemart does not behave as expected. The ajax call recalculate gives me the error in the response (you can see this with firebug):

Fatal error:  Call to undefined method JDocumentRAW::setName() in /components/com_virtuemart/controllers/productdetails.php on line 305.

You can see this problem in http://www.beluckykids.com/virtuemart.html?view=productdetails&virtuemart_category_id=1&virtuemart_product_id=6


There is two sizes: 4/5 and 6 (4/5 have stock, 6 no). The prices are the same.

I'm desperate for a solution to this error. Could someone give a hand with this? Thanks!

bytelord

#1
Hello,

Could you try with the default vm theme with no overrides? I use firebug but did not take an error, just huge time to execute js. So try it with the default theme and report your results back. Also you are loading a lot of javascript, if is working with default themes/templates then you should ask your template provider also.

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

razor7

Hi, this happens on j15 (1.5.26 in my case) only. To fix it, just add setName and getNAme methods to class JDocument, edit file libaries/joomla/document/document.php, and add the following code after line 678

    /**
     * Set the document name
     * @access public
     * @param string $name
     */
    public function setName($name) {
        $this->name = $name;
    }

    /**
     * Get the document name
     * @access public
     * @return string
     */
    public function getName() {
        return $this->name;
    }
MGS Creativa - VirtueMart Payment Plugin Experts
http://www.mgscreativa.com

Take a look at our downloads section for VirtueMart payment plugins and mouch more!
http://www.mgscreativa.com/en/online-store

bytelord

Hello,

May be this have to do with your custom template that uses joomla 2.5 jdocument classes ... not sure. You could search your code to see when jdocument is called instead of jelement or japplication may be...
But you solve it :)

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

jlbarkas

Quote from: razor7 on December 10, 2012, 16:45:08 PM
Hi, this happens on j15 (1.5.26 in my case) only. To fix it, just add setName and getNAme methods to class JDocument, edit file libaries/joomla/document/document.php, and add the following code after line 678

    /**
     * Set the document name
     * @access public
     * @param string $name
     */
    public function setName($name) {
        $this->name = $name;
    }

    /**
     * Get the document name
     * @access public
     * @return string
     */
    public function getName() {
        return $this->name;
    }



Thank you very much! This solve my problem!