Iframe in description tab

I am uploading my products with a csv file daily. For the description field I want instead of text that I use now to use an iframe to an external url. That url is html and has the info I need for each product.



I have got 2 questions,

1- can I do that? I am thinking of changing the code of product page and make it take the url and show it in the description field. I mean upload as description text “http://test.com/product1.asp” and the product page will show in description the content of that url.

2- which is the file that loads the product page? I could not find it, new to cs-cart.



Thanks

Giorgos

I use iframes in the Tab Content and it works. I pull YouTube video into an iframe for one of my tabs.

You should be able to just include the iframe code into the description field - I paste it in Code view in the wysiwyg editor.

[quote name='Magpie Don' timestamp='1362422626' post='156980']

I use iframes in the Tab Content and it works. I pull YouTube video into an iframe for one of my tabs.

You should be able to just include the iframe code into the description field - I paste it in Code view in the wysiwyg editor.

[/quote]



+1

I do this too with YouTube videos.

Great thanks. I wanted to try it but I could not find the .php file that the description tab is in. Any help with that?

Why are you going to hard code it for all your products?

I just put it in the Full Description field along with your other data. I actually do this with the form for the product in admin.

If you are uploading a CSV file, just include the code for the iframe directly in the field for the Full Description. Include the

That could be a solution but I am uploading 3.000 products and putting more text would make my csv bigger.



To explain further, my issue analytical is:



I have an eshop that I upload daily the products a supplier gives me through CSV. For each product I have now a small description that does not satisfy me. The supplier gives me full description at a url. For product with id AS345 the full detail is at SupplierSite.com is for sale | HugeDomains



In my site any product has the unique code. So I want when someone hits product with code AS345S to see as description the content of SupplierSite.com is for sale | HugeDomains. Same for all products.



Dont I need to change the core code? Any one has a clue where this file is? Is it encrypted?



Hope it makes sense.

Mods any help? At least the path for the file I need to modify?

I've done this is the past using csv files too. But by far the best way was to import direct to the database.



Can't recall the process needed but I may revisit it if I have time.



As for the size of the csv file, try it with just the minimum fields. I know if I do more then about 5 files I can only import 25 products because I hit the 60sec timeout on cloud hosting. But if I just have 3 fields I can import anything as long as they are not images.

and import it from the server, this allows bigger files in my experience



John

[quote name='geokir' timestamp='1362419190' post='156978']

I am uploading my products with a csv file daily. For the description field I want instead of text that I use now to use an iframe to an external url. That url is html and has the info I need for each product.



I have got 2 questions,

1- can I do that? I am thinking of changing the code of product page and make it take the url and show it in the description field. I mean upload as description text “http://test.com/product1.asp” and the product page will show in description the content of that url.

2- which is the file that loads the product page? I could not find it, new to cs-cart.



Thanks

Giorgos

[/quote]



You want this file: skins/basic/customer/blocks/product_tabs/description.tpl



Of course if you change this file directly you are running this risk of overwriting upon core files upgrade.



Find:

{$product.full_description|default:$product.short_description|unescape}



Below add something like the following:





That will give you an output like this:

http://demo.requincr…ew&product_id=6



This method does not check to see that the URL is valid before rendering so you have to make sure that all your URL's are setup properly with correct permissions on the files.



If you want something customized that will pull the sku for each product and auto-generate a, an iframe with the SKU specific URL I'll give you a quote.

requincreative thanks that was very helpful…



I have found it and replaced it with:

```php



{$product.full_description|default:$product.short_description}

```
but can not make it work. I have tried product_code also but nothing. The code my products have are the same as my suppliers site. So with this I will have the description for each. But cant find which is the right variable that gives the code.

[b]johnbol1[/b] & [b]kickoff3pm[/b] my problem is not the csv import.. thanks for your advices but when I increased the memory in php configurations I was able to load big files like 3.000 products

Are you using the product_id which is a CS-Cart specific id or the SKU or product code?



To use Product Code as it is displayed on the page try this






Don't forget to clear your cache by executing admin.php?cc

requincreative probably I had not clear my cache that is why _code was not working or seem to.



Anyway I have it done. Thanks fro your help, I will customize the iframe and everything will look good.

Hello again, I re-open the same project as I have the same problem.



We did updates to CS-Cart version and files were lost. I tried to redo the above iframe issue to my products.



I use the responsive theme so I did changes to:

/design/themes/responsive/templates/blocks/product_tabs/description.tpl



There I changed the code to:

```php




```

The iframe gives me an error. The {$product.product_code} INSIDE the href gives nothing. I used it outside the href, inside the div and it is gives me the SKU as it should. But in the href gives nothing.

Any advice?

I have tried your code on my local installation and it works.

Yes you are right. I apologize, the products category that I was testing was removed from that site.



Sorry again,

Giorgos