Welcome, Guest
Username: Password: Remember me

TOPIC: Customise Invoice

Customise Invoice 6 years 3 months ago #3797

Hello Admin,

I need to customise the invoice.

For instance I want the Invoice number to be a 10-digit number starting from 0000000001 and I want all headings in two languages in the same invoice.

Which files do I tweak?

Thanks!

Dennis
Last Edit: 6 years 3 months ago by aggeliki@xtd.gr.
The administrator has disabled public write access.

Customise Invoice 6 years 2 months ago #3804

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 900
  • Thank you received: 64
  • Karma: 7
Hello Dennis,

Line 2785
function invoice($order) { ...

On class.php from the latest version is the place where you can do that.

Thanks
Plugin Developer
e-mail This email address is being protected from spambots. You need JavaScript enabled to view it.
Need fast web hosting service? Use our SSDShared.com
Get 1 month free cPanel MOCHA LATTE package with coupon: SHOPFILES1MONTH
It works great with both Joomla and WordPress.
How fast? demo.ssdshared.com
The administrator has disabled public write access.

Customise Invoice 6 years 2 months ago #3808

Hi,

Thank you for your response!

I managed the multilingual titles but I would need your help in making the number of each invoice be a 10-digit one like this 0000000001 and the 100th one 0000000100...

I presume I fiddle with this:
$invoice->setType("Invoice");
if (@$this->cfg != '') {
$prefLen = strlen($this->cfg);
$ref = $this->cfg . str_pad($order->order_id, 10 - $prefLen, '0', STR_PAD_LEFT);
} else { $ref = str_pad($order->order_id, 10 , '0', STR_PAD_LEFT); }

But what exactly do I change?

Thanks!

Dennis
The administrator has disabled public write access.

Customise Invoice 6 years 2 months ago #3809

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 900
  • Thank you received: 64
  • Karma: 7
Hello Dennis,

Yes, I believe so, did you give it a test?

Thanks
Plugin Developer
e-mail This email address is being protected from spambots. You need JavaScript enabled to view it.
Need fast web hosting service? Use our SSDShared.com
Get 1 month free cPanel MOCHA LATTE package with coupon: SHOPFILES1MONTH
It works great with both Joomla and WordPress.
How fast? demo.ssdshared.com
The administrator has disabled public write access.

Customise Invoice 6 years 2 months ago #3810

No ;-)

Don't know what exactly to change ;-)
The administrator has disabled public write access.

Customise Invoice 6 years 2 months ago #3829

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 900
  • Thank you received: 64
  • Karma: 7
Hello,

How many chars indent you have it at the moment?

Thanks
Plugin Developer
e-mail This email address is being protected from spambots. You need JavaScript enabled to view it.
Need fast web hosting service? Use our SSDShared.com
Get 1 month free cPanel MOCHA LATTE package with coupon: SHOPFILES1MONTH
It works great with both Joomla and WordPress.
How fast? demo.ssdshared.com
The administrator has disabled public write access.
Time to create page: 0.060 seconds