OpenCart is deleting all decimals in admin panel - decimal

When I'm changing some product parameters in OpenCart admin panel and saving data, OpenCart deletes all decimals. Problem lies in admin panel not with displaying numbers on main shop page. It doesn't matter if I want to set price, weight ect. Decimals are always gone.
I was trying to find problem in OpenCart code but I can't. I didn't set that shop, I'm just helping friend with this problem.
I also checked database. Price, weight ect fields are set to decimal(15,4) so it's ok. When I'm updating data manually directly from database, everything is ok. I have no idea what to do.
Thanks for all your responses.

i think you can find what you want on this file as a example system/library/weight.php
and the code what you have to change is this:
return number_format($value, 2, $decimal_point, $thousand_point) . $this->weights[$weight_class_id]['unit'];

Related

Back to search results

On the website I run we have a single search field where you can enter a name or profession. When you search you are served with a page full of results that come from 3 seperate sources.
Once you click on one field e.g. John Do, you will be taken to his page. On that page we have a back to search, but it goes to a blank screen.
I want to go back to the actual search results so the person doesn't have to do it all again, but I'm not sure where to start. Any suggestions?
That's a tricky situation.
There can be many solutions for this issue but I'll will name some of them.
Activate the cache of the pages (Quick trick, no suitable for websites that relies on users (*login)), you can go back and your form will be the same with the results without any issue.
Manage the load of the page of Jhon Do as a ajax load and #hashtag references, you don't reload the page but you just manage the states of the HTML. (Can be done with JS frameworks or React)
Depends on which platform are you working try to manage the variable of the search with this concept post-redirect-get
Hope that is helps!
Cheers.

People listage in SharePoint page

i have an intranet (which is my main website) and a several sub-websites, which refers to the departments of the company. I need to add a list with people related to department of the current web-site. The list can be the same view of the SharePoint native search.
I find this component (Search Results), which i was able to add my criterias (like people which department is equals to "HR"), and i get the right results. However, i couldn't find an way to make the view similar to the results of the image above.
Somebody can help me? Thanks
Edit:
I've changed the configurations to use "People Item" display index. Firstly, i had to import a javascript file. Then, even though that i had the right results, the properties aren't filled in the fields of the display item (as is shown in the image below).

Google CSE (Custom Search Engine) different search button and fields?

I am getting some strange (to me) results when using Google CSE on my site.
Background:
The site has a MAIN search field (Google CSE #1 we'll call it).. that was set up in the Google CSE admin panel.. and set to be a site wide search.
I recently added a page that will be the front end search for a directory of PDF's.
I went back to Google CSE admin page.. made a NEW entry for this PDF sub-directory..
pointed to only this directory and its child/sub-directories..
set it to ONLY return .pdf results..
outside of these two differences, both CSE accounts/entries are set-up identical.
The problem or question I have is..
the 'results' pages (while have the same exact settings, search field on top of results, full row...single page..etc)..are different a bit.
the 'new' page results has a tan colored 'ad block' on top of the results..
and 'more importantly' the results page SEARCH field itself looks different, and the SEARCH BUTTON itself looks different, and has an 'x' (close/clear) button right after it
if the settings are the same,.. how am I getting different looks? if only PDF file type or confined to a sub-directory for indexing/searching are different?.. do those settings somehow give different looking elements like that?
the new page SEARCH/SUBMIT button also have a magnifying glass on it. where original one has search text..
I didnt see anything in the "Look and Feel" section of the admin pages
what is affecting the different looks?
answer: choosing hide ads or not under the BUSINESS section in Google CSE admin page changes the 'looks' of the search field & submit button...
why that should affect the visual results, I have no clue.

New site column not displaying in SPF2010

After much trials-and-errors, I've managed to find how to add new columns in Site Pages of our Sharepoint Foundation 2010.
I'll explain using a field called "Category" I created. The problem I have now is that the only way to add or edit my page categories is to first create a new page, enter its title when asked by the pop-up, enter the content of the page, saving, and then going back in to the page properties. That's the only place I'm seeing my new "category" field.
I've set the field as "required", so it's supposed to be filled, but it doesn't seem to matter.
Moreso, I'd like to see the categories of the page I'm looking at at the bottom, for example, but when I open a page I only see its title and content, nothing else.
Can someone help me understand how to manage this? I'm mostly on my own and SPF2010 is not very well documented for a newbie from what I've seen in my searches.
Thanks in advance.
Is your new column called Category part of your default View or whatever View that you are looking at?
Your question reminds me a precision I didn't wrote about:
In the "All Pages" View (if I understand Sharepoint correctly), which is like a list of all the pages of my site, I've managed to add columns for the new fields I've created.
My wish is to be able to enter data for these new fields at page creation, like when we enter the title of a new page, and/or when I go to edit its content.
Only place so far I found to edit my new fields is in the Page Properties, which requires the page to be created first, or in this "All Pages" View where I added my fields. I'd like to categorize my pages as I create them, which could save us lots of time since we're starting our documentation project and nothing has been done yet...

Sharepoint Custom List with custom new forms not able to add to folders

I have a custom list which has customized edit and new forms which were required by the user.
I then tried to add a new item to a folder (folders have the text of the year e.g. 2010) and when I click save on the customized new form it saves correctly but always to the root of the list.
I am wondering if there is a fix or a work around for this as it is highly annoying.
Alternatively can anyone recommend a way to implement a field which will auto calculate + 1 year from creation date, which might be a possible alternative however it will have to take into account the following.
Where the current year runs october to september.
Thanks for any help this has been driving me mad trying to find a solution.
Can't help much without knowing what you based the custom form on, but for a new form the folder to save to usually shows up in the query string.
The form is a basic custom form list which I have then just modified parts to remove fields that are not required or need to be read only.
The original form worked perfectly and allowed items to be added to the list subfolders.
The new one has no additional code and is using the standard sharepoint DataFormWebPart to create the custom list form and so I have no back end code to insert the item etc, although I may have to resort to this...will I?
You need to be careful when modifying standard forms. I recommend you go back to a copy of the standard form and verify that that saves correctly. Remove the "unneeded" fields until it stops working.
Sometimes with this sort of customisation you need to use css rather than server side changes to modify the form so that the functionality remains in place after the component is hidden.
It is definitely not an issue with the removal of fields as I created a new copy of the original and then changed it to a custom field saved it and tried to add an item.
It went straight into the root.
I tried the original form and it saves to the sub folder correctly.
Okay only work around I have for this at moment (I am currently in discussion with MS) is this.
http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx
I used the method getTagFromIdentifierAndTitle(tagName, identifier, title)
This returned the element I was after and then I basically went to the row dom node and deleted it.
I am hoping to have a nicer method but at least it is a work around for now.

Resources