Add column to order
Hello, I am using xcart 5.1.3.
I am trying to add a column to the order model as I want a checkbox at checkout to update it. I have a module with the following code. PHP Code:
And I also have a install.yaml file like so: Code:
XLite\Model\Order\Modifier: My build gets stuck here: Code:
Re-building cache [step 4 of 9], please wait... 1)How do I rebuild when my build get stuck like this?? 2)Is there any problems with what I have done? Thanks |
Re: Add column to order
Could you please provide the error messages from the var/log folder in your installation?
Besides that, do I understand you correctly that you want to allow customers to say that they are going to have a tax-free order? |
Re: Add column to order
Thanks for the reply!
On checkout I wanted a customer to say they would like a Tax free order yes, but only do the tax deduction to certain products which admin have flagged as VatFreeAvailable(or possibly have certain attribute or class?). The approach I was going to take was decorate the product and order models like so: Product with $vatReliefable; Order with $agreeToVatRelief; Then possibly override the XLite\Module\CDev\VAT\Logic\Order\Modifier\Tax Calculate method. To say something like: PHP Code:
Then add a checkbox on the checkout which changes agreeToVatRelief to true/false and reloads the page. Any input on if this is a viable/good idea, would be great! Ill get back to you on my log files. Thanks. |
Re: Add column to order
Could I get some feedback on this approach?
because my build goes into infinite maintenance mode 80% of the time and gets stuck on the step below(5.1.4) , and makes it almost impossible to do it via trail and error. Thanks On my Linux Redhat box: Code:
Deploying store [step 10 of 11], please wait... On my xxamp windows local: Code:
Deploying store [step 5 of 11], please wait... |
Re: Add column to order
Hi Deepvas!
Thank you for explaining it. This is really interesting task and I would be really interested in describing it thoroughly in our dev docs. Will it be OK with you if I can provide code sample in about a month? As for cache regeneration, do you have any error messages in the <X-Cart 5>/var/log/ folder? Tony. |
Re: Add column to order
Quote:
Yes, that would be great and a even better learning experience, thank you. I have rebuilt my Linux server and it's behaving better now thanks so should be ok(windows won't work however). A real world example is here: Where you can see the text "VAT Relief is available if you make a declaration in the Shopping Basket", with a check-box at checkout. Thanks and I am looking forward to hearing from you. |
Re: Add column to order
Happy to hear that it would work good for you!
If you experience problems with running X-Cart 5 on Windows, please try to apply fix described here: http://forum.x-cart.com/showpost.php?p=375710&postcount=15 This problem will be fixed in 5.1.5. |
All times are GMT -8. The time now is 08:46 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.