Zen Cart Logo
Forums / General Questions / How do you export product URL's?

How do you export product URL's?

Views: 1,587

Results 1 to 9 of 9
27 Oct 2014, 4:21 PM
#1
jokkah avatar

jokkah

New Zenner

Join Date:
Aug 2014
Location:
Northern Virginia
Posts:
81
Plugin Contributions:
0

How do you export product URL's?

I am setting up my products into a Google Merchant template XLS file and one column requires the URL's to the products. I have not found a way to do this in Zen Cart. I have tried 'Excel Populate' but that 1) Does not export all categories at once, and 2) I tested exporting one, and the 'URL' column does not get populated

I also have Easy Populate 4 but that does not do URL's from what I can tell.

The plugins I am seeing to feed Google Merchant have had errors and errors for 1.5.3 and no fixes are in progress from reading the latest forum posts on the support threads.

Does anyone know how I can export URL's? Better yet, a working Google Merchant Center feeder for 1.5.3?

Thank you!

27 Oct 2014, 6:36 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How do you export product URL's?

Effectively what would work would be to export the result of using a combination of zen_href_link and the desired/necessary server name to begin the link. Otherwise, the address can be put together using other available data thatmay be in a spreadsheet, products_id, and category information in conjunction with the product type information or applicable main_page that goes with what is being presented. Unless you are trying to do this through a uri rewriter, which adds a little more to the complexity.

EP4 does not at this time export the uri, but that could be modified to suit. What uris are you after? Sounds like definitely products, but the categories specific uri as well?

I thought there was a google feed type plugin that might require a little updating otherwise that would suit.

27 Oct 2014, 6:46 PM
#3
jokkah avatar

jokkah

New Zenner

Join Date:
Aug 2014
Location:
Northern Virginia
Posts:
81
Plugin Contributions:
0

Re: How do you export product URL's?

Hmm, I am not sure if I grasp what you have suggested. Do you mean putting all this together from the database tables themselves?

I can easily just append the server name to a combination of data in other columns, but what about the URL's that use subcategories? An example would be servername:///index.php?main_page=product_info&cPath=312_322&products_id=611 (ones with underscore to separate category to subcategory)

I was thinking of just using an Excel formula to build all the product URL's, (servername + category + products_id) but ran into a snag when I realized a lot of the products are in subcategories such as the example above

27 Oct 2014, 7:01 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How do you export product URL's?

Technically all that is needed for those is the last category. The product type is still important if you are using any product type other than the default product type 1 (product_info) but yes, could just use the data from myphpadmin to create the uri. Afterall that's all that really happens anyways, it's just done through functions and procedures to give a consistent method.

Try going to that product omitting the 312_ and open a browser next to it, with the uri above. What's the difference between the two other than the uri?

27 Oct 2014, 7:07 PM
#5
jokkah avatar

jokkah

New Zenner

Join Date:
Aug 2014
Location:
Northern Virginia
Posts:
81
Plugin Contributions:
0

Re: How do you export product URL's?

mc12345678:

Technically all that is needed for those is the last category. The product type is still important if you are using any product type other than the default product type 1 (product_info) but yes, could just use the data from myphpadmin to create the uri. Afterall that's all that really happens anyways, it's just done through functions and procedures to give a consistent method.

Try going to that product omitting the 312_ and open a browser next to it, with the uri above. What's the difference between the two other than the uri?

Ah. I see.

Well, removing the 312_ goes to the product, but the breadcrumb is omitted. Also, on the left side of the page where the categories are listed, it doesn't drill down in a 'tree' format to see the category all the way to sub or sub-sub category. I suppose this is ok for Google Merchant because you can still purchase the product from that page?

27 Oct 2014, 8:33 PM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How do you export product URL's?

Would generally agree, but may cause some confusion to a visitor... Almost done with a mod to EP4 to incorporate/add the uri to the full products export, and will duplicate something similar for categories. Looking at this being switchable from the EP4 configuration menu so that it is something that can be turned off (faster processing) if not desired to include. Doing this instead of creating a new export option as it seems somewhat more appropriate.

27 Oct 2014, 8:55 PM
#7
jokkah avatar

jokkah

New Zenner

Join Date:
Aug 2014
Location:
Northern Virginia
Posts:
81
Plugin Contributions:
0

Re: How do you export product URL's?

mc12345678:

Would generally agree, but may cause some confusion to a visitor... Almost done with a mod to EP4 to incorporate/add the uri to the full products export, and will duplicate something similar for categories. Looking at this being switchable from the EP4 configuration menu so that it is something that can be turned off (faster processing) if not desired to include. Doing this instead of creating a new export option as it seems somewhat more appropriate.

I seem to have something working....here is what I did:

  1. Run the following MySQL Query:
SELECT master_categories_id, products.`products_id`, products_description.`products_name`
FROM products
INNER JOIN products_description
ON products.`products_id` = products_description.`products_id`
  1. Save results to CSV

  2. Open CSV in Excel, add 'http://store.yourstore.com/index.php?main_page=index&cPath=' to one column

  3. Add '&products_id=' to another column

  4. In final column, use the formula '=D3&A3&E3&B3' or something like that to add URL (step 3 URL), plus master_categories_id, plus second URL piece (step 4) plus products_id

The result of that column should be the complete URL

I hope there is a better, more automated way soon!! (and I hope this makes sense)

30 Oct 2014, 10:54 PM
#8
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How do you export product URL's?

jokkah:

I seem to have something working....here is what I did:

  1. Run the following MySQL Query:

SELECT master_categories_id, products.products_id, products_description.products_name
FROM products
INNER JOIN products_description
ON products.products_id = products_description.products_id

> 
> 2. Save results to CSV
> 
> 3. Open CSV in Excel, add 'http://store.yourstore.com/index.php?main_page=index&cPath=' to one column
> 
> 4. Add '&products_id=' to another column
> 
> 5. In final column, use the formula '=D3&A3&E3&B3' or something like that to add URL (step 3 URL), plus master_categories_id, plus second URL piece (step 4) plus products_id
> 
> The result of that column should be the complete URL
> 
> I hope there is a better, more automated way soon!! (and I hope this makes sense)

Generally makes sense though would have helped others to identify exactly which column was represented by each of the cell values. :) would have had EP4 up, but some of the ZC cross functions were kicking my ########. If I required the functions_categories.php file it conflicted with something else in the admin.  Finally found the admin side function to generate the category path, but had to leave before I could test it.  EP4 version 4.0.27 coming soon with the added functionality of providing the path to products as given by using zen_catalog_href_link functionality from the admin.  Had a solution earlier this week, but the host on which it was tested started having problems, so had to delay completion of the change. An added benefit of this functionality is that if say CEON URI Mapping is installed and active, then the resulting rewritten paths will be provided. Not sure of the other uri rewriters and theirintegration with the admin's zen_catalog_href_link code. Ohh, and still will be a day or two considering a "holiday" that is coming. :)
5 Nov 2014, 9:28 PM
#9
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How do you export product URL's?

jokkah:

I seem to have something working....here is what I did:

  1. Run the following MySQL Query:

SELECT master_categories_id, products.products_id, products_description.products_name
FROM products
INNER JOIN products_description
ON products.products_id = products_description.products_id

> 
> 2. Save results to CSV
> 
> 3. Open CSV in Excel, add 'http://store.yourstore.com/index.php?main_page=index&cPath=' to one column
> 
> 4. Add '&products_id=' to another column
> 
> 5. In final column, use the formula '=D3&A3&E3&B3' or something like that to add URL (step 3 URL), plus master_categories_id, plus second URL piece (step 4) plus products_id
> 
> The result of that column should be the complete URL
> 
> I hope there is a better, more automated way soon!! (and I hope this makes sense)

Version 4.0.27 to EP4 has been uploaded to <https://github.com/mc12345678/EasyPopulate-4.0> which should eventually be mirrored to <https://github.com/chaddro/EasyPopulate-4.0>.  A similar message will be posted on the EasyPopulate v4 thread (<http://www.zen-cart.com/showthread.php?190417-EasyPopulate-4-0-Support-Thread>).