Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Import "buy_Now_Url" From Csv Rate Topic   - - - - -

 
  • kaddy
  • Senior Member
  • Trial users
  • Join Date: 29-Nov 14
  • 167 posts

Posted 29 November 2014 - 05:01 PM #1

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

Thanks

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19471 posts

Posted 01 December 2014 - 02:37 PM #2

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


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 My Changes module
3. Clear the cache
4. Check the result

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • ypg
  • Member
  • Members
  • Join Date: 16-Nov 06
  • 73 posts

Posted 10 August 2019 - 09:05 AM #3

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.

 

 

 



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19471 posts

Posted 12 August 2019 - 05:45 AM #4

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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • ypg
  • Member
  • Members
  • Join Date: 16-Nov 06
  • 73 posts

Posted 12 August 2019 - 08:43 AM #5

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 <a href="http://www.xxx.com" class="ty-btn ty-btn__primary " >Buy now</a>



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19471 posts

Posted 12 August 2019 - 01:18 PM #6

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 <a href="http://www.xxx.com" class="ty-btn ty-btn__primary " >Buy now</a>

 

Did you clear cache?


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • ypg
  • Member
  • Members
  • Join Date: 16-Nov 06
  • 73 posts

Posted 13 August 2019 - 04:41 AM #7

Did you clear cache?

yes cache was already cleared.



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19471 posts

Posted 13 August 2019 - 05:57 AM #8

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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • ypg
  • Member
  • Members
  • Join Date: 16-Nov 06
  • 73 posts

Posted 13 August 2019 - 06:45 AM #9

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



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19471 posts

Posted 13 August 2019 - 01:39 PM #10

You are welcome!


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.