Jump to content
UncleSteve

Page URL - How to establish from Easy Populate?

Recommended Posts

Hi Guy's.

 

Please bare with me, its been about eight years since I set my site up, so have forgotten most of the terminology and what add-ons I've installed.

 

I need to supply a spreadsheet of my products to a 3rd party with the following information

Product code

Product description

Image location URL

Product location URL

 

The product image URL was easy, I just added http://www.mysite.com/store/images/ before the image name. real easy in a spread sheet

 

However its not so straight forward with the product page URL as I have an add-on that creates a search engine friendly URL (sorry, can't remember what it was called), such as

http://www.mysite.com/store/blank-widget-panel-p-8513.html

The product code would be something like MLD-blank_widget

 

As a temporary URL I could use

http://www.mystore.com/store/advanced_search_result.php?keywords=

Then add the product code at the end, but I'd prefer a URL that goes direct to the product description page.

 

Can someone help me out please? Thanks in advance :)

 

 

PS. I have about 3K of products, so don't want to manually go through each product to get the URL


____________________________________________________________________

____________________________________________________________________

Share this post


Link to post
Share on other sites

Well, I won't "bare" with you, as you're evidently not an attractive lady, but I will be happy to "bear" with you! :)
 
This really doesn't have anything to do with Easy Populate, other than both involving a CSV file. How are you producing this file? Are you exporting a CSV from your store database and then manually editing it? Do you have a PHP (or other) script to read your store database and directly write out the CSV? That would involve some minor programming, but would allow you to mix and match data to produce a finished CSV in one step. If this is not a one-time job, that would certainly be worth doing (and might be worth it for a large one-off job).
 
Specifically, in your product URL http://www.mysite.com/blank-widget-panel-p-8513.html, I don't think you actually need "blank-widget-panel" (which comes from the product name or title field) in the URL. Just the "-p-8513" is the critical part. By the way, is this other application going to be accessing your store via the normal osC links (such as your product URL), or is it supposed to go directly into the database? If the latter, it's not going to work. The product number (id) (8513) is somewhere in the product database, possibly as the product_id field.

 

If you can tell us how you plan to produce the CSV file (which can be imported into a spreadsheet, if the other party actually wants it that way), we could offer some suggestions on how to do it. For a one-off job, I would suggest manually exporting selected database fields to a CSV file, and then either manually edit it or knock together a quick and dirty "rearranger" in your favorite language to reformat the data to the desired form. If this is a job to be done periodically, I would write PHP code to read the database and write out the CSV file in the desired final form. There may be an add-on or two somewhere to do something similar, which you could adapt to your purposes.

Share this post


Link to post
Share on other sites

Well, I won't "bare" with you, as you're evidently not an attractive lady, but I will be happy to "bear" with you! :)

Ha ha.. I really don't mind which way we do it ;) and thanks for taking a look at my problem.

 

This really doesn't have anything to do with Easy Populate, other than both involving a CSV file. How are you producing this file? Are you exporting a CSV from your store database and then manually editing it?

I've used Easy Populate to create a basic file to work with in Excel

 

Do you have a PHP (or other) script to read your store database and directly write out the CSV?

Sorry, no

 

That would involve some minor programming, but would allow you to mix and match data to produce a finished CSV in one step. If this is not a one-time job, that would certainly be worth doing (and might be worth it for a large one-off job).

This currently is a one off, but there may be others in the future

 

Specifically, in your product URL http://www.mysite.com/blank-widget-panel-p-8513.html, I don't think you actually need "blank-widget-panel" (which comes from the product name or title field) in the URL. Just the "-p-8513" is the critical part.

 

By the way, is this other application going to be accessing your store via the normal osC links (such as your product URL), or is it supposed to go directly into the database? If the latter, it's not going to work. The product number (id) (8513) is somewhere in the product database, possibly as the product_id field.

The spread sheet is going to be used to set up product details on another site, but with links back to my site.

 

There are around 3,000 products, so keen for a reasonably automated way to gather the info together

 

If you can tell us how you plan to produce the CSV file (which can be imported into a spreadsheet, if the other party actually wants it that way), we could offer some suggestions on how to do it. For a one-off job, I would suggest manually exporting selected database fields to a CSV file, and then either manually edit it or knock together a quick and dirty "rearranger" in your favorite language to reformat the data to the desired form. If this is a job to be done periodically, I would write PHP code to read the database and write out the CSV file in the desired final form. There may be an add-on or two somewhere to do something similar, which you could adapt to your purposes.

I have looked at the sitemap.xml file to see if I could match the two sets of data in some way. I can't remember how the xml file was generated though :(

____________________________________________________________________

____________________________________________________________________

Share this post


Link to post
Share on other sites

Thinking a bit more, I used to have a php page that generated a list of all products, but as more and more product got added, it became far too large for anyone to use. I'll have to have a look through my old backups to see if I can find it, and hopefully re-work it.


____________________________________________________________________

____________________________________________________________________

Share this post


Link to post
Share on other sites

@@UncleSteve You can install the Google Feeder addon. It creates product and image urls. There will be other columns you probably don't need but those can be easily deleted from the generated file. It may or may not provide rewritten url's since the code won't work with some rewriters.

Share this post


Link to post
Share on other sites

@@UncleSteve You can install the Google Feeder addon. It creates product and image urls. There will be other columns you probably don't need but those can be easily deleted from the generated file. It may or may not provide rewritten url's since the code won't work with some rewriters.

Hi Jack,

 

Thanks for the heads up on the google feeder.

 

I may have to opt to get you to install it for me as I get errors as per the following..

Warning: fopen(feeds/your-outfile.txt) [function.fopen]: failed to open stream: Permission denied in /home/mysite/public_html/store/admin/googlefeeder.php on line 553

Warning: fwrite(): supplied argument is not a valid stream resource in /home/mysite/public_html/store/admin/googlefeeder.php on line 554

Warning: fclose(): supplied argument is not a valid stream resource in /home/mysite/public_html/store/admin/googlefeeder.php on line 555

Warning: fopen(feeds/your-outfile.txt) [function.fopen]: failed to open stream: Permission denied in /home/mysite/public_html/store/admin/googlefeeder.php on line 553

Warning: fwrite(): supplied argument is not a valid stream resource in /home/mysite/public_html/store/admin/googlefeeder.php on line 554

Warning: fclose(): supplied argument is not a valid stream resource in /home/mysite/public_html/store/admin/googlefeeder.php on line 555

Warning: fopen(feeds/your-outfile.txt) [function.fopen]: failed to open stream: Permission denied in /home/mysite/public_html/store/admin/googlefeeder.php on line 553

Warning: fwrite(): supplied argument is not a valid stream resource in /home/mysite/public_html/store/admin/googlefeeder.php on line 554

Warning: fclose(): supplied argument is not a valid stream resource in /home/mysite/public_html/store/admin/googlefeeder.php on line 555

Warning: fopen(feeds/your-outfile.txt) [function.fopen]: failed to open stream: Permission denied in /home/mysite/public_html/store/admin/googlefeeder.php on line 553

Warning: fwrite(): supplied argument is not a valid stream resource in /home/mysite/public_html/store/admin/googlefeeder.php on line 554

Warning: fclose(): supplied argument is not a valid stream resource in /home/mysite/public_html/store/admin/googlefeeder.php on line 555

Warning: fopen(feeds/your-outfile.txt) [function.fopen]: failed to open stream: Permission denied in /home/mysite/public_html/store/admin/googlefeeder.php on line 553

Warning: fwrite(): supplied argument is not a valid stream resource in /home/mysite/public_html/store/admin/googlefeeder.php on line 554

Warning: fclose(): supplied argument is not a valid stream resource in /home/mysite/public_html/store/admin/googlefeeder.php on line 555

Warning: fopen(feeds/your-outfile.txt) [function.fopen]: failed to open stream: Permission denied in /home/mysite/public_html/store/admin/googlefeeder.php on line 553

Warning: fwrite(): supplied argument is not a valid stream resource in /home/mysite/public_html/store/admin/googlefeeder.php on line 554

Warning: fclose(): supplied argument is not a valid stream resource in /home/mysite/public_html/store/admin/googlefeeder.php on line 555

Warning: fopen(feeds/your-outfile.txt) [function.fopen]: failed to open stream: Permission denied in /home/mysite/public_html/store/admin/googlefeeder.php on line 561

Warning: fwrite(): supplied argument is not a valid stream resource in /home/mysite/public_html/store/admin/googlefeeder.php on line 562

Warning: fclose(): supplied argument is not a valid stream resource in /home/mysite/public_html/store/admin/googlefeeder.php on line 563

Feed contains 3251 products.
Then I get lines of product urls (only). Around 590 ish out of 3251, then the following error messages

File Completed (with warnings): your-outfile.txt

Warning: fopen(feeds/your-outfile.csv) [function.fopen]: failed to open stream: Permission denied in /home/mysite/public_html/store/admin/googlefeeder.php on line 614

Warning: fwrite(): supplied argument is not a valid stream resource in /home/mysite/public_html/store/admin/googlefeeder.php on line 615

Warning: fclose(): supplied argument is not a valid stream resource in /home/mysite/public_html/store/admin/googlefeeder.php on line 616

Use the following for easier viewing from this page. It is still in development and not meant for anything other than viewing.
File Completed (with warnings): your-outfile.csv

Warning: chmod() [function.chmod]: No such file or directory in /home/mysite/public_html/store/admin/googlefeeder.php on line 624

Script timer: 1.126548 seconds.
Okay I've got errors, however from your description, I was expecting something different, not just product urls. Can you advise please?

 

Thanks :)


____________________________________________________________________

____________________________________________________________________

Share this post


Link to post
Share on other sites

A little progress... I've now found a file in mysite.com/store/feeds

(store = catalog)

 

This file does have a lot of suitable information, however only about 900 products are listed. Is there a setting I can change somewhere perhaps?


____________________________________________________________________

____________________________________________________________________

Share this post


Link to post
Share on other sites

You shouldn't use the upload option, which is why all of the errors showed up. If you are running the script manually without fully installing it, then use this in the url:  ...com/googlefeeder.php?noftp=1

 

You will need to edit the settings (top of the file) to use your domain name.

 

The code is setup to only show active products since inactive ones will cause a problem if the addon is used as it is meant. You can try changing this line

if ( $row->prodStatus == 1 ) {

to

if (false && $row->prodStatus == 1 ) {

Share this post


Link to post
Share on other sites

Please I  need your help. My easy populate 2.8 is not adding new products into my oscommerce 2.3.4 store. it will only display: file name, username, temporary file and stuff like that. What could be the problem?

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

Hi,

You could switch on EP master Product extention so you will get the products_id.

You can easy generate an URL with concate excell built in functions.

http://yoursite/products_info.php?products_id=(EP products_id)

How to get products_id from EP?

alternatively you can add into products_id as a required field in the easypopulate.php

 

 

// ********************
// ** products table **
// Lets say you have added a field to your "products" table called
// "products_upc". The header name in your import file will be
// called "v_products_upc".  Then below you will change the line
// that looks like this (without the comment double-slash at the beginning):
// $custom_fields[TABLE_PRODUCTS] = array(); // this line is used if you have no custom fields to import/export
//
// TO:
// $custom_fields[TABLE_PRODUCTS] = array( 'products_upc' => 'UPC' );
//
// If you have multiple fields this is what it would look like:
// $custom_fields[TABLE_PRODUCTS] = array( 'products_upc' => 'UPC', 'products_restock_quantity' => 'Restock' );

Modify this line:

$custom_fields[TABLE_PRODUCTS] = array(); // this line is used if you have no custom fields to import/export
$custom_fields[TABLE_PRODUCTS] = array('products_id'=>'My id'); // this line is used if you have no custom fields to import/export

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×