Jump to content
Latest News: (loading..)
brookedow

How to add Products URL: to Product Info Pages OSC 2.3.4.1

Recommended Posts

Posted (edited)

How to add Products URL: to OSC 2.3.4.1

Admin > New Product

 
Products URL:
(without http://)
 

Admin > Configuration > Product Listing Does Not Show Products URL:

Product Info Pages

Do Not Show Products URL:

 

 

 

 

 

 

 
 
Edited by brookedow

Share this post


Link to post
Share on other sites

Interesting why would you want to do that? Never mind, to answer your question, how you implement it depends on what you are using BS or not!

Best solution would if BS with modular product info just make a new module,

If not the just edit product_info page to add ( for non modular BS)

$product_url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
Below,
require('includes/languages/' . $language . '/product_info.php');

This will retrieve the URL for the page

Then add this at the pont in the page you want to display the URL or add htlm to make it a link.

echo $product_url;

You can probably do this several ways but this should give you a starting point.

 


 

Share this post


Link to post
Share on other sites

It is Bootstrap, just make a new module?

 

The Product URL is in the Admin > New Product, but not Product Info pages.

 

How do I make new Module?

Share this post


Link to post
Share on other sites
Posted (edited)
2 hours ago, JcMagpie said:

Interesting why would you want to do that? Never mind, to answer your question, how you implement it depends on what you are using BS or not!

Best solution would if BS with modular product info just make a new module,

If not the just edit product_info page to add ( for non modular BS)


$product_url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
Below,
require('includes/languages/' . $language . '/product_info.php');

This will retrieve the URL for the page

Then add this at the pont in the page you want to display the URL or add htlm to make it a link.


echo $product_url;

You can probably do this several ways but this should give you a starting point.

 

This seems to create a link to the current store page. I'm trying to add the link to the manufactures website that I\you can enter on:  Admin > Add New Product > Products URL: (without http://) Field.

   

 

 
   
Edited by brookedow

Share this post


Link to post
Share on other sites
Posted (edited)

That URL function inside the product_info.php was removed somewhere along the way. The original use for it was to add a manufacturer link. For example if you sell PC parts you can add a link to the manufacturers product info page.
You can however download an old osC package like osC 2.2MS2 and look at the product_info.php file.
You will see that the code needs some update and you need to add a new/old file redirect.php which also needs some code update.

Ideally would be to pack everything into a module so that you don't need to change any core code.
How to make modules?? Maybe look at one of the product_info modules and see how that is done there.

Give it a try and if you should get stuck somewhere just ask.

P.S. I do wonder why they left that URL stuff inside the admin area but removed it from the front store...

Edited by Tsimi

Share this post


Link to post
Share on other sites
Posted (edited)

If you downloaded your shop from the official osCommerce site then just add the following code there where you want to show the URL part inside the product_info.php page.

<?php
    if (tep_not_null($product_info['products_url'])) {
	  echo '<div>' . sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)) . '</div>';
    }
?>

 

Edited by Tsimi

Share this post


Link to post
Share on other sites
14 hours ago, brookedow said:

This seems to create a link to the current store page. I'm trying to add the link to the manufactures website that I\you can enter on:  Admin > Add New Product > Products URL: (without http://) Field.

😂 Sorry I was a bit confused about the question. Looks like you got a respone anyway. If your still wanting to do it as an add-on then just use this.


 

Share this post


Link to post
Share on other sites
3 hours ago, brookedow said:

OSC 2.3.4 Bootstrap

Then you can use Zahid's module to add the URL part into your product_info page.
The "official" osC version does not have the module call inside the product_info.php file that is why I posted my code for direct placement. That is not needed for you if you run the Bootstrap version.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×