Issue with postfinance module in oscommerce - oscommerce

I have integrated postfinance module for oscommerce. I have done everything mentioned in http://addons.oscommerce.com/info/6442 docs.When I tried to test it in 'test mode' ...after selecting the payment method it is redirecting to 'Order success' page with out showing option to enter postfinance card details....in the admin panel it shows that a purchase has been made and it is processing.

At your checkout_confirmation.php please replace:
if ($$payment->code == 'paypal_ipn') {
with
if (isset($$payment->form_action_url)) {

Related

Odoo 14 : element '<xpath expr="//*[hasclass('o_footer_copyright_name')]">' cannot be located in the parent view

I migrate from odoo 13 to odoo 14, but when I import all this; My website has an error like :
load could not load template
ValueError: The element '<xpath expr="//*[hasclass('o_footer_copyright_name')]">' could not be located in the parent view
View name: Footer Language Selector
Error context:
view: ir.ui.view(3822,)
view.parent: ir.ui.view(2094,)
Template: 1816
Path: /t/t
An error occurred while rendering template 1816
I didn't edited this view btw.
If anyone has a solution I'm interested!
Thanks by advance !
I experienced the same issue while upgrading from Odoo Enterprise 13 to 14.
Note the following points:
The Release Notes (https://www.odoo.com/odoo-14-release-notes) state:
"Add the language selector in the header and customize the layout."
There is a new view added called 'Footer Language Selector' (Key:
portal.footer_language_selector). This appears to be added while
running the Odoo DB upgrade 13 > 14.
The 'Footer Language Selector' view is not created when setting up a new
Odoo 14 database!
To resolve your issue, you need to disable the 'Footer Language Selector' view. This can be done in one of two ways:
If you are logged in to your Odoo instance, enable Developer Mode, and go to Settings > Technical > User Interface > Views and search for 'Footer Language Selector'. Select the view, and then select the menu option to 'Archive'
If you are not logged in/not able to log in, you need to disable the view in the database directly. Here is the command that will disable the view: UPDATE public.ir_ui_view SET active = false WHERE id = 3822; NOTE: the 'id = 3822' value must match the view number in the error: ir.ui.view(3822,)
I hope this helps you resolve the issue which appears to be a bug introduced by the Odoo DB update tool.

browser.click() & browser.send_keys() conflict - Selenium 3.0 Python 2.7

I am currently trying to implement a subtitle downloader with the help of the http://www.yifysubtitles.com website.
The first part of my code is to click on the accept cookies button and then send keys to search the movie of interest.
url = "http://www.yifysubtitles.com"
profile = SetProfile() # A function returning my favorite profile for Firefox
browser = webdriver.Firefox(profile)
WindowSize(400, 400)
browser.get(url)
accept_cookies = WebDriverWait(browser, 100).until(
EC.element_to_be_clickable((By.CLASS_NAME, "cc_btn.cc_btn_accept_all")))
accept_cookies_btn = browser.find_element_by_class_name("cc_btn.cc_btn_accept_all")
accept_cookies_btn.click()
search_bar = browser.find_element_by_id("qSearch")
search_bar.send_keys("Harry Potter and the Chamber of Secrets")
search_bar.send_keys(Keys.RETURN)
print "Succesfully clicked!"
But it only works once - if not randomly. If I turn on my computer and run the code, it does click, make the search and print the last statement. The second time, it doesn't click but still make the search and print the final statement.
After each try, I close the session with the browser.quit() method.
Any idea on what might be the issue here?
Specify wait for button and search bar it should solve your problem.
Thanks,D

Admin Logged In Validation - Front End Opencart

Is there any way to check if the admin is logged in at front-end in Opencart? I would like to show a notice bar with content "Admin Logged In" when I open my store.
To be precise, in the controller of my module, i would like to add:
$data['admin_logged'] = some_function;
and when I echo it in my .tpl to get 1 if admin is logged in or 0 if not.
Actually i got it done by:
// Check if admin is logged in - frontend
$this->user = new User($this->registry);
$data['admin_logged']=($this->user->isLogged())
Now you can use if($admin_logged) /* do stuff here */
Thank you anyway
Yes, you can check it, using the User class:
$data['admin_logged'] = $this->user->isLogged() ? 1 : 0;

How to display correct local time on view ticket page in fossil

I see the ticket view page display like
username added on 2015-10-29 08:51:00:
In fact, it should be 2015-10-29 16:51:00:
My time zone is GMT+8, so I changed the view ticket from
...
query {SELECT datetime(tkt_mtime) AS xdate, login AS xlogin,
...
html " added on $xdate:\n"
...
To
...
query {SELECT datetime(tkt_mtime+8/24) AS xdate, login AS xlogin,
...
html " added on $xdate:\n"
...
But, it won't work.
Tip: "it won't work" is not a good description of your problem. You're much more likely to get (effective) help if you describe what exactly goes wrong; what you expected to happen, what did happen, and what message appeared.
That said...
Use SELECT datetime(tkt_mtime, 'localtime') as xdate to convert utc to your local time zone.
Check out SQLite's documentation on date functions for more info.

Sitecore Web Forms for Marketers and DMS - not recording campaigns, goals and dropout info

In WFFM there is an option so that, when someone abandons the form, any data that was entered in the form itself is recorded and should be accessible via the Dropout Report.
I have a WFFM for which I have turned on Analytics and turned on the dropout feature. Unfortunately I don't see any data being recorded in the DB and the Dropout Report is visible, but empty.
I see from the javascript code included in the WFFM folder that a series of AJAX calls are supposed to save the fields on blur events -- with calls to /sitecore modules/web/Web Forms for Marketers/Tracking.aspx
I tried debugging the Javascript code, but the method supposed to post the info to /sitecore modules/web/Web Forms for Marketers/Tracking.aspx is never being called. Can you think of any reasons for this code not to work? Also, does anyone know which table this information is supposed to be recorded? Is it the fields table in the WFFM DB?
Finally, even though I have turned on analytics on this particular WFFM form and I have associated a campaign and a goal to the submission of the form, none of these is being recorded. I see that the data entered in the form is stored successfully and is displaying in the Data Report, but no info about the Campaign nor the Goal are recorded in the DB.
I even checked manually directly in the DMS DB running:
select top 10
p.DateTime, p.UrlText, cp.CampaignName
,i.Url, vi.VisitId
from pages p
inner join ItemUrls i on p.ItemId = i.ItemId
inner join Visits vi on vi.VisitId = p.VisitId
inner join GeoIps g on vi.Ip = g.Ip
left join Campaigns cp on cp.CampaignId = vi.CampaignId
order by p.DateTime desc
This one shows that the page where the form is rendered is being hit, but no campaign is associated to the visit.
Then I tried the following:
select pe.datetime, ped.Name, pg.UrlText from PageEvents pe
inner join PageEventDefinitions ped on ped.PageEventDefinitionId = pe.PageEventDefinitionId
inner join Pages pg on pg.PageId = pe.PageId
order by pe.DateTime desc
But I don't see any entry for this particular campaign nor for the goal (while I see entries for other campaigns and goals associated to non-WFFM Sitecore items)
Any advice would be greatly appreciated!
Thanks,
Francesco
EDIT
The sc.webform.js file contains this method:
_create: function () {
var self = this,
options = this.options;
if (options.tracking) {
this.element.find("input[type!='submit'], select, textarea")
.bind('focus', function (e) { self.onFocusField(e, this) })
.bind('blur change', function (e) { self.onBlurField(e, this) });
this.element.find("select")
.change(function () { $scw.webform.controls.updateAnalyticsListValue(this) });
this.element.find("input[type='checkbox'], input[type='radio']")
.click(function () { $scw.webform.controls.updateAnalyticsListValue(this) });
}
this.element.find(".scfDatePickerTextBox").each(function () { $scw.webform.controls.datePicker(this) });
},
This is supposed to be called by the form on sc.webform widget initialization. It should bind the focus and blur change events for all input fields, drop downs and text areas. Unfortunately, when I tried to put a break point inside this method, it never gets called.
SECOND EDIT
Interesting. I figured out that the whole thing should start from this line of Javascript code embedded in the page that contains the WFFM form:
<script type="text/javascript">
$scwhead.ready(function() {
$scw('#form_A8BF483419174F97A2830E12CBCF7E4F').webform({formId: "{A8BF4834-1917-4F97-A283-0E12CBCF7E4F}",pageId: "{21C24144-B964-4FBA-8388-D9B90EBBC17C}",eventCountId: "pagecolumns_0_columncontent_0_bottomrow_0_form_A8BF483419174F97A2830E12CBCF7E4F_form_A8BF483419174F97A2830E12CBCF7E4F_eventcount",tracking: true})
});
</script>
Once I put a break point here, I was finally able to trace into the _create method of the jQuery.UI widget defined in sc.webform.js. The code that calls _create is actually inside the jQuery.UI library. Kinda makes sense, right?
Finally, the code inside _create is executed, the blur events are bound to the TrackEvents method, also defined within the widget:
_trackEvents: function(events) {
$scw.ajax({
type: 'POST',
url: "/sitecore modules/web/Web Forms for Marketers/Tracking.aspx" + location.search,
data: {track: JSON.stringify(events)},
dataType: 'json'
});
What doesn't make sense is that now, even though I can finally see trackEvents being called whenever I tab from field to field in the WFFM form (why wasn't working before it's a mistery to me), I don't see any data recorded in the WFFM DB. I even tried a quick query in the DB:
select f.Timestamp, f.StorageName, fi.Value, fi.FieldName
from Form f
inner join Field fi on f.Id = fi.FormId
order by f.Timestamp desc, FieldName
Does anybody know where is Tracking.aspx supposed to save the captured field informations?
This may be silly to ask, but did you configure the data source correctly for your WFFM? I mean, obviously, you're using WFFM..but is it set to use SQL or is it using the "file" that WFFM uses by default as it's database.
like this to use SQL:
<!-- MSSQL-->
<formsDataProvider type="Sitecore.Forms.Data.DataProviders.WFMDataProvider,Sitecore.Forms.Core">
<param desc="connection string">Database=Sitecore_WebForms;Data Source=xxx;user id=xxx;password=xxx;Connect Timeout=30</param>
</formsDataProvider>
<!-- SQLite -->
<!--<formsDataProvider type="Sitecore.Forms.Data.DataProviders.SQLite.SQLiteWFMDataProvider,Sitecore.Forms.Core">
<param desc="connection string">Data Source=/data/sitecore_webforms.db;version=3;BinaryGUID=true</param>
</formsDataProvider>-->
If you don't configure that correctly, I'm wondering if somehow data is being recorded in one place but not another? Also, another question I have is to ask if this is a dev environment, are you running webforms in live mode? It just seems to me like this is a configuration issue.
We are experiencing the exact same problem on 6.5 update 6 and WFFM 2.3.3 rev. 111209. We can see the asynchronous calls to the server including the probably well formed json object containing the correct event.
Example:
track:[{"fieldId":"{E0A0BCDD-85E1-4D8D-9E76-5ABD240423C9}","type":"Field Completed","value":"test","formId":"{0F3B57C1-1B6A-43B9-A5A6-2E958C168B31}","pageId":"{025AFF68-62B9-42CE-B49F-0C36311E1976}","ticks":16}]
We don't see any of the dropouts arrive in the database, though...
Have you made sure your campaigns and goals have been deployed? If you have switched databases they may not be. To redeploy do this:
For each Goal in System -> Marketing Center -> Goals
Change the workflow state to draft
Save
Then in the review ribbon click deploy.
This will create an entry in the pageeventdefinition table and allow
you to query.
Don't forget to do the same for campaigns.