Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

</head> location


socom

Recommended Posts

trying to install push notification and it says put before the </head> in templates but unable to locate have tried /includes/template_top.php but cant see it in there? any help would be great please

Link to comment
Share on other sites

2.3.4.1 CE (BS) Frozen and most other 2.3.4.x versions:

includes/template_top.php line 45-51:

<script src="ext/jquery/jquery-3.1.1.min.js"></script>

<?php echo $oscTemplate->getBlocks('header_tags'); ?>
</head>
<body>

  <?php echo $oscTemplate->getContent('navigation'); ?>

Did you try the search function in your text editor? 🙂

Link to comment
Share on other sites

3 minutes ago, raiwa said:

2.3.4.1 CE (BS) Frozen and most other 2.3.4.x versions:

includes/template_top.php line 45-51:


<script src="ext/jquery/jquery-3.1.1.min.js"></script>

<?php echo $oscTemplate->getBlocks('header_tags'); ?>
</head>
<body>

  <?php echo $oscTemplate->getContent('navigation'); ?>

Did you try the search function in your text editor? 🙂

I dont have any of that please see SS 

Screenshot 2018-11-02 at 17.54.50.png

Link to comment
Share on other sites

I see the get abit get header tags but thats it

on the mod it says

 

<script type="text/javascript" data-cfasync="false">
 var _foxpush = _foxpush || [];
 _foxpush.push(['_setDomain', 'xxxxxxxxxx']);
 (function(){
     var foxscript = document.createElement('script');
     foxscript.src = '//cdn.foxpush.net/sdk/foxpush_SDK_min.js';
     foxscript.type = 'text/javascript';
     foxscript.async = 'true';
     var fox_s = document.getElementsByTagName('script')[0];
     fox_s.parentNode.insertBefore(foxscript, fox_s);})();
 </script>

 

Step 2 : Copy and paste code into your website template before the closing </head> tag
Link to comment
Share on other sites

your template_top.php is not standard, never saw something like this, it even doesn't look like correct/clean php code.

Which exact OsCommerce version you are using and do you have a template installed.

How do you edit this file, which text editor are you using?

Link to comment
Share on other sites

I was already suspicious of something like an admin page editor.

You can't edit this file with the page editor in admin.

You should download a copy of the file via ftp to your local computer and edit it with a simple text editor like notepad or something similar.

Then upload and replace with the ftp client.

You could also use a file editor provided by your hosting like CPanels file editor, but I wouldn't recommend it.

Always make a copy/backup before editing files.

Link to comment
Share on other sites

This "Surfalot" product appears to be an HTML editor, rather than a proper PHP editor (or plain text editor). Never use an HTML editor (such as Dreamweaver) to edit PHP code. If it has a PHP (or plain text) edit mode, perhaps that would be safe to use. Whatever you're doing, it's thoroughly corrupting your code, as shown in your screen image.

Something like Surfalot might be suitable for WYSIWYG-style editing of product descriptions, but don't touch PHP code with it!

Link to comment
Share on other sites

Thanks sorted yep looks like had to be done via that addon one of those apps thats been installed for something ages ago and forgot what it was for 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...