Post by spottedhaggis » Fri Nov 13, 2015 3:50 am

I am trying to add a simple update database button to the admin header menu.
I have a working link, but all it does is tell me permission denied, so I know I am missing something.
I remember back in the days of Zencart you had to register a new file in a specific file, but I dont know if Opencart has such a thing.

I have created the relevant language fields
Added the link into various files in admin, and have an updatedb.php file with the mysql relevant information in, but I was not able to find anything that gives a simple step by step to generating a new page.

Is there such a thing

Active Member

Posts

Joined
Tue Jun 26, 2012 11:20 pm

Post by grgr » Fri Nov 13, 2015 9:36 am

Not quite sure what you have done but have you looked in admin > users > user groups and giving the Top Admin permission for the updatedb. You might find an entry in there for it.

Image Image Image Image Image Image Image Image


User avatar
Active Member

Posts

Joined
Mon Mar 28, 2011 4:08 pm
Location - UK

Post by spottedhaggis » Tue Nov 24, 2015 3:37 pm

Thanks, sorry I never got back sooner, but I worked it out using logic.

So, for anyone interested, apparently Google say that in order for your shop to work in their systems it must display both the Non VAT price and the VAT inclusive prices for all items, including options.
My client is using price by options, so no one item has a single price, instead the prices are per option, and there seemed no way to have the system display both prices back to back.

So I made a few tweaks to the system files, nothing huge,added a new field into the product_options_value called pricevatinc and ran a db query that took the price * 1.2 and put the value into this new field, then I just told the page to simply display the field next to the existing price field, and so the outcome is this

1 box =£9.15+VAT (£10.98 inc VAT)
2 boxes =£17.39+VAT (£20.86 inc VAT)

The key here is that all cart calculations and functions use the non vat price, all I am doing is displaying the price with the vat added, so its not going to screw up anything in the calculations process (visible only).

It works perfect but for one issue. The customer exports all product data to an excel file, adds and modifies products, saves and uploads it, which in turn wipes out the database entry for the table that is being called on to provide the vat inclusive price, hence the new admin feature.

After a little logic, I worked out where all the new files have to be placed.

Active Member

Posts

Joined
Tue Jun 26, 2012 11:20 pm
Who is online

Users browsing this forum: No registered users and 16 guests