Zen Cart Logo
Forums / General Questions / Which Function gerates the URL for a given product?

Which Function gerates the URL for a given product?

Views: 531

Results 1 to 5 of 5
11 Feb 2013, 5:25 PM
#1
chadderuski avatar

chadderuski

Totally Zenned

Join Date:
Apr 2006
Location:
Dark Side of the Moon
Posts:
986
Plugin Contributions:
0

Which Function gerates the URL for a given product?

Hi All,

I've had a couple requests to add a feature to Easy Populate 4, one that give a product URL. Amazon want's this for their pay-per-click model, and apparently several other also.

I've been poking around the code, but not striking gold! If someone could point me in the right direction, I'd really appreciate it!

thanks!
chadd

11 Feb 2013, 5:47 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Which Function gerates the URL for a given product?

Have a look at Numinix's Google Merchant Centre feeder... This generates a product URL for parsing into the resultant XML file.

11 Feb 2013, 6:04 PM
#3
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Which Function gerates the URL for a given product?

Sitemap XML mod also generates a product URL

11 Feb 2013, 7:01 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Which Function gerates the URL for a given product?

$sql = "use a query that gets at least products_id and master_categories_id from the products table";
$result = $db->Execute($sql);
$prod_link = zen_href_link(zen_get_info_page($result->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($result->fields['master_categories_id']) . '&products_id=' . $result->fields['products_id']);
11 Feb 2013, 9:02 PM
#5
chadderuski avatar

chadderuski

Totally Zenned

Join Date:
Apr 2006
Location:
Dark Side of the Moon
Posts:
986
Plugin Contributions:
0

Re: Which Function gerates the URL for a given product?

DrByte:

$sql = "use a query that gets at least products_id and master_categories_id from the products table";
$result = $db->Execute($sql);
$prod_link = zen_href_link(zen_get_info_page($result->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($result->fields['master_categories_id']) . '&products_id=' . $result->fields['products_id']);


Thank you both for your replies.

Doc, this looks like it will be very simple to implement in EP4. 

thanks!

-chadd