Import "buy_Now_Url" From Csv

Hi all

I have a question - how I can import buy_now_url from csv file in cataloc mode?



Thanks

[quote name='kaddy' timestamp='1417280503' post='198331']

I have a question - how I can import buy_now_url from csv file in cataloc mode?

[/quote]


  1. Create the app/addons/my_changes/schemas/exim/products.post.php file with the following content:


```php

$schema['export_fields']['Buy Now URL'] = array(
'db_field' => 'buy_now_url'
);
return $schema;
```

2. Install the [b]My Changes[/b] module
3. Clear the cache
4. Check the result

The default Buy Now button in cataloge mode opens the external urls in the same window. Is it possible to open the link in new window.

design/themes/THEME/templates/addons/catalog_mode/hooks/buttons/add_to_cart.override.tpl

replace

{include file="buttons/button.tpl" but_id=$but_id but_text=__("buy_now") but_href=$product.buy_now_url but_role=$but_role|default:"text" but_meta="ty-btn__primary" but_name=""}

with

{include file="buttons/button.tpl" but_id=$but_id but_text=__("buy_now") but_href=$product.buy_now_url but_role=$but_role|default:"text" but_meta="ty-btn__primary" but_name="" but_target="_blank"}

and clear cache then

design/themes/THEME/templates/addons/catalog_mode/hooks/buttons/add_to_cart.override.tpl

replace

{include file="buttons/button.tpl" but_id=$but_id but_text=__("buy_now") but_href=$product.buy_now_url but_role=$but_role|default:"text" but_meta="ty-btn__primary" but_name=""}

with

{include file="buttons/button.tpl" but_id=$but_id but_text=__("buy_now") but_href=$product.buy_now_url but_role=$but_role|default:"text" but_meta="ty-btn__primary" but_name="" but_target="_blank"}

and clear cache then

Thanks for update but still when you click on Buy now button the external url loads in same page.

The link generated in buy now button does not contain (target"_blank").

It contains link as Buy now

Thanks for update but still when you click on Buy now button the external url loads in same page.

The link generated in buy now button does not contain (target"_blank").

It contains link as Buy now

Did you clear cache?

Did you clear cache?

yes cache was already cleared.

It should work. Try to delete the var/cache directory manually

It should work. Try to delete the var/cache directory manually

Yes, it is working now.

Thank you so much for your time and efforts.

YPG

You are welcome!